These are chat archives for ramda/ramda

6th
Feb 2016
Tobias Pflug
@gilligan
Feb 06 2016 00:13
@scott-christopher thanks for your answers on the PR. Got a bit further
Scott Christopher
@scott-christopher
Feb 06 2016 00:24
@gilligan :thumbsup: I'll be around the place for a few more hours if you have any more questions.
Sebastien Daniel
@SebastienDaniel
Feb 06 2016 02:19
are there any resources worth mentioning beyond the ramda docs and Dr. boolean's mostly adequate guide ?
The documentation is actually quite good, but I'm new to the functional paradigm
Keith Alexander
@kwijibo
Feb 06 2016 08:00
@SebastienDaniel resources for anything in particular?
For FP in js there are quite a few good blog posts scattered around
Richard Seldon
@arcseldon
Feb 06 2016 08:03
@SebastienDaniel - my recommendation is http://learnyouahaskell.com/
don't be put off by the title.
Keith Alexander
@kwijibo
Feb 06 2016 08:03
There is a book called javascript allonge which describes various functional patterns
Richard Seldon
@arcseldon
Feb 06 2016 08:04
mostly adequate guide is also good as you mentioned. and "functional javascript" by michael fogus.
Keith Alexander
@kwijibo
Feb 06 2016 08:05
And for general functional concepts, http://fsharpforfunandprofit.com/ is very very good
Keith Alexander
@kwijibo
Feb 06 2016 08:10
As with @arcseldon's recommendation, don't be put off by the title; I don't know any F# and I've learned a lot from that site
In particular http://fsharpforfunandprofit.com/fppatterns/ is a great intro to FP techniques
Richard Seldon
@arcseldon
Feb 06 2016 08:19
@kwijibo - agreed, the video is excellent, very entertaining.
Tobias Pflug
@gilligan
Feb 06 2016 08:44
@scott-christopher crap.. I should switch to your time zone until I have all this figured out ;)
Scott Christopher
@scott-christopher
Feb 06 2016 08:46
:) I'll be around for another 3 or 4 hours.
Hardy Jones
@joneshf
Feb 06 2016 15:41
@bberry6 I think sanctuary makes this problem much cleaner: http://goo.gl/4kTHbD
@Bradcomp hey man!
Sebastien Daniel
@SebastienDaniel
Feb 06 2016 17:08
Thx @arcseldon & @kwijibo !
Already into Javascript allongé (great read!) and the mostly adequate guide, too.
I'll look into those blog posts.
greatly appreciated
Sebastien Daniel
@SebastienDaniel
Feb 06 2016 21:25
Is there a way to compose find() to search for an element by priority? Or should I just use 2 successive finds, such as that:
find(pathEq(["ContactMethod", "key"], "office_mail")) || find(pathEq(["ContactMethod", "key"], "home_mail"));
thx :)
Keith Alexander
@kwijibo
Feb 06 2016 21:29
@SebastienDaniel maybe http://ramdajs.com/docs/#anyPass
find(anyPass(pathTest1, pathTest2))
Sebastien Daniel
@SebastienDaniel
Feb 06 2016 21:30
but anyPass could return true for the second value, if it is evaluated before the first
in my case I need "priority" to be considered
i.e. the order matters
Raine Virta
@raine
Feb 06 2016 21:41
SebastienDaniel: I've had same problem before
Raine Virta
@raine
Feb 06 2016 21:46
just checking some old code. one way I've solved it is by calculating a score for each item with a function and using it with maximumBy