Created
May 1, 2017 19:35
-
-
Save mattpodwysocki/18fac33500c811920a7a9f48625427ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IterableX } from '../../iterable'; | |
import { _if as ifStatic } from '../../iterable/if'; | |
function* _if<T>( | |
fn: () => boolean, | |
thenSource: Iterable<T>, | |
elseSource: Iterable<T>) { | |
return new IterableX(ifStatic(fn, thenSource, elseSource)); | |
} | |
IterableX.if = _if; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this: