Advertisement
Guest User

Untitled

a guest
Jan 14th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun add(n) x = x + n;
  2. fun del(n) x = x - n;
  3. fun mlt(n) x = x * n;
  4.  
  5. fun manipulate_one(k,[],action) = []
  6. |   manipulate_one(1,l1,action) = (action (hd l1)) :: tl l1
  7. |   manipulate_one(k,l1,action) =
  8.         if k >= 1 then
  9.             hd l1 :: manipulate_one(k-1, tl l1, action)
  10.         else
  11.             l1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement