<infinisil>
> findFirst = pred: default: list: let index = iterateUntil (i: i >= lib.length list || pred (lib.elemAt list i)) (i: i + 1) 0; in if index >= lib.length list then default else lib.elemAt index
<infinisil>
> findFirst = pred: default: list: let index = iterateUntil (i: i >= lib.length list || pred (lib.elemAt list i)) (i: i + 1) 0; in if index >= lib.length list then default else lib.elemAt list index
<infinisil>
While this iterateUntil implementation doesn't need to use lib.tail/lib.head like the current one, this one needs a whole bunch of attributes
rajivr has joined #nix-lang
ddellacosta has quit [Ping timeout: 240 seconds]
tilpner_ has joined #nix-lang
tilpner has quit [Ping timeout: 260 seconds]
tilpner_ is now known as tilpner
kalbasit has quit [Remote host closed the connection]
kalbasit has joined #nix-lang
kalbasit_ has joined #nix-lang
kalbasit has quit [Ping timeout: 256 seconds]
kalbasit has joined #nix-lang
kalbasit_ has quit [Ping timeout: 240 seconds]
kalbasit_ has joined #nix-lang
kalbasit has quit [Ping timeout: 240 seconds]
kalbasit_ has quit [Ping timeout: 240 seconds]
__monty__ has joined #nix-lang
sphalerite has quit [Quit: brb rebooting]
lukegb has joined #nix-lang
sphalerite has joined #nix-lang
tilpner_ has joined #nix-lang
tilpner has quit [Ping timeout: 240 seconds]
tilpner_ is now known as tilpner
tilpner_ has joined #nix-lang
tilpner has quit [Ping timeout: 260 seconds]
tilpner_ is now known as tilpner
kalbasit has joined #nix-lang
__monty__ has quit [Quit: leaving]
rajivr has quit [Quit: Connection closed for inactivity]