S-expressions: Difference between revisions
Content added Content deleted
Line 3,693: | Line 3,693: | ||
const quoteTokens = q => |
const quoteTokens = q => |
||
// Alternating unquoted and quoted segments. |
// Alternating unquoted and quoted segments. |
||
s => s.split(q). |
s => s.split(q).flatMap( |
||
(k, i) => even(i) ? ( |
(k, i) => even(i) ? ( |
||
k |
Boolean(k) ? ( |
||
[k] |
|||
⚫ | |||
⚫ | |||
); |
); |
||
Line 3,833: | Line 3,835: | ||
// of f to the seed value x, terminating when |
// of f to the seed value x, terminating when |
||
// that result returns true for the predicate p. |
// that result returns true for the predicate p. |
||
f |
f => { |
||
const go = x => |
|||
⚫ | |||
x |
|||
) : go(f(x)); |
|||
return go; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
}; |
}; |
||