Qurak

TakeWhile

Available

Takes elements from the start while a predicate is true.

TakeWhile[list, crit]
TakeWhile[{1, 2, 3, 4, 5}, # < 4 &] → {1, 2, 3}TakeWhile[{2, 4, 6, 7, 8}, EvenQ] → {2, 4, 6}

Topics

Related

All 6300 functions · Use this from an MCP client