mirror of
https://github.com/emacs-twist/org-babel.git
synced 2024-12-14 11:07:30 +00:00
11 lines
285 B
Nix
11 lines
285 B
Nix
pred:
|
|
with builtins;
|
|
let
|
|
go = before: rest:
|
|
if (length rest == 0)
|
|
then { inherit before; sep = null; after = [ ]; }
|
|
else if pred (head rest)
|
|
then { inherit before; sep = head rest; after = tail rest; }
|
|
else (go (before ++ [ (head rest) ]) (tail rest));
|
|
in
|
|
go [ ]
|