Created
October 11, 2014 18:20
-
-
Save joom/d9ae61c540799433f2e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% adds X to the beginning of each list in the second argument. | |
% Haskell equiv: map (X:) secondArg | |
cons_all(_, [], []). | |
cons_all(X, [H|Tl], [[X|H]|NewTl]) :- | |
cons_all(X, Tl, NewTl). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment