Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Using the min function in Naiad #22

Open
@tmalhotra003

Description

Hi Team Naiad,

I am fairly new to Naiad (and must say that it sounds really cool!). I was trying to write a simple Console Application in Visual Studio, where given a set of words, I can find the length of the smallest word. With each epoch of data, I want to calculate and return the length of the smallest word. To do so in Naiad,I wrote the following snippet:

var words = computation.NewInputCollection();
words.SelectMany(x => x.Split(' '))
.Min(w => w, w => w.Length )
.Subscribe(l => { foreach (var element in l) Console.WriteLine(element); });

With this snippet, I am not getting any word lengths at all, and I wanted to ask if I am using the functions right. Any advise/ help would be greatly appreciated!
Thanks in advance!

Best Regards,
Tanya

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions