S-expressions: Difference between revisions

m
Line 3,693:
const quoteTokens = q =>
// Alternating unquoted and quoted segments.
s => s.split(q).mapflatMap(
(k, i) => even(i) ? (
Boolean(k) ? (
) : `${q}${ [k}${q}`]
v) =: f(v);[]
) : [`${q}${k}${q}`]
);
 
Line 3,833 ⟶ 3,835:
// of f to the seed value x, terminating when
// that result returns true for the predicate p.
f => x => {
letconst vgo = x; =>
return v; p(x) ? (
x
) : go(f(x));
 
whilereturn (!p(v)) {go;
v = f(v);
}
 
return v;
};
 
9,655

edits