These are chat archives for ramda/ramda

16th
Feb 2015
Nathan
@terakilobyte
Feb 16 2015 19:43
sorry to bother, could someone tell me what I'm doing wrong here? If this isn't the appropriate place to ask then double apologies. Each function called works on its own but the ifElse is giving me the business. It keep saying "Cannot read property 'apply' of undefined"
var doWork = _.ifElse(doesItHaveSpacesOrUnderScores, spinalThat, spinalThis);
David Chambers
@davidchambers
Feb 16 2015 19:57
Is _ your name for the Ramda object?
> var f = R.ifElse(R.eq(0), R.always('zero!'), String)
undefined
> f(0)
'zero!'
> f(42)
'42'
Nathan
@terakilobyte
Feb 16 2015 20:03
@davidchambers yeah I declared it as var _ = R after importing it
I’m a developer at freecodecamp, I really like the idea of funtional programming, and we’re looking to incorporate ramda into our challenge framework and teach it. None of that really matters, except before we start teaching it I need to get a whole lot better with it :(
Nathan
@terakilobyte
Feb 16 2015 20:29
@davidchambers does the predicate have to be returned in an identity?
David Chambers
@davidchambers
Feb 16 2015 20:56
@terakilobyte, I don't understand your question.
Raine Virta
@raine
Feb 16 2015 21:57
how can the docs be for 0.10.0 if it's not out yet
nevermind, something is up with my npm