One limitation I see is something like this is not possible:
import allPass from 'mojiscript/logic/allPass' import cond from 'mojiscript/logic/cond' const isFizz = num => num % 3 === 0 const isBuzz = num => num % 5 === 0 const isFizzBuzz = allPass ([ isFizz, isBuzz ]) const fizziness = cond ([ [ isFizzBuzz, 'FizzBuzz' ], [ isFizz, 'Fizz' ], [ isBuzz, 'Buzz' ], [ () => true, x => x ] ]) fizziness(1) //=> 1 fizziness(3) //=> 'Fizz' fizziness(5) //=> 'Buzz' fizziness(15) //=> 'FizzBuzz'
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One limitation I see is something like this is not possible: