Skip to content
This repository has been archived by the owner on Mar 3, 2018. It is now read-only.

Prefer R.when/R.unless over R.ifElse #6

Open
lo1tuma opened this issue Dec 16, 2015 · 1 comment
Open

Prefer R.when/R.unless over R.ifElse #6

lo1tuma opened this issue Dec 16, 2015 · 1 comment

Comments

@lo1tuma
Copy link
Owner

lo1tuma commented Dec 16, 2015

R.ifElse(R.is(Array), R.head, R.identity) // could be written as R.when(R.is(Array), R.head)
R.ifElse(R.isEmpty, R.identity, R.toLower) // could be written as R.unless(R.isEmpty, R.toLower)
@davidchambers
Copy link

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants