Qurak

FoldWhile

利用可能

Folds a function over a list while a predicate holds, returning the first

FoldWhile[f, x, {a1, a2, …}, test]
FoldWhile[f, list, test]
FoldWhile[f, x, {a1, a2, …}, test, m]
FoldWhile[f, x, {a1, a2, …}, test, All]
FoldWhile[f, x, {a1, a2, …}, test, m, n]
FoldWhile[f, x, {a1, a2, …}, test, m, - n]
FoldWhile[f, test]
FoldWhile[Times, 2, {2, 3, 4, 5}, # < 100 &] → 240FoldWhile[Times, 2, {2, 3, 4, 5}, # < 1 &] → 2FoldWhile[Plus, {1, 2, 3, 4, 5}, # < 6 &] → 6FoldWhile[Times, 1, {2, 2, 3, 3, 4}, Unequal, 2] → 144FoldWhile[Plus, 0, {1, 2, 3, 4, 5}, # < 6 &, 1, 1] → 10

トピック

関連

全 6300 関数 · MCPクライアントから使う