highland icon indicating copy to clipboard operation
highland copied to clipboard

Use more concrete examples

Open brian-gates opened this issue 11 years ago • 5 comments

There's a lot of ambiguity in the examples that slowed me down in understanding what exactly was going on. I think if the examples were fully functional, it would help a lot in quickly learning what this library is capable of.

For example, readFile here is left to the users' imagination. A concrete, working example that I can use out of the box would be more helpful:

var data = _(filenames).map(readFile).parallel(4);

brian-gates avatar Feb 17 '14 18:02 brian-gates

Agreed. One format could be a chart which maps features from the 'async' library to the highland equivalent.

I tried a map().parallel(n) action, but it does nothing. I think the issue is that I don't have anywhere I want to pipe() the data to. The transformation step in map() is all I need.

markstos avatar Feb 21 '14 02:02 markstos

@markstos sounds like that map() is really an each() - using each() causes a 'thunk' so it'll pull the data through like piping

caolan avatar Mar 09 '14 23:03 caolan

:+1: Please make all the examples small but complete programs that you could save as a file run pass to node and have it work. Many of them are really really biased towards "the reader fully understands everything EXCEPT what this specific function does". data.pipe(output); is really frustrating.

focusaurus avatar Aug 09 '14 23:08 focusaurus

👍 - Yes I spent hours on what looks to be very useful. I can't work out how to use it.

3goats avatar Sep 14 '16 21:09 3goats

Thanks for the prod. I definitely agree that our examples need work. I'll try to flesh them out some.

vqvu avatar Sep 15 '16 05:09 vqvu