Advertisement
Guest User

Untitled

a guest
Dec 6th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val d = elem([1,2,3,4], elem([3,4,5], empty 3))
  2.  
  3. fun splosna f s ope =
  4.     case s of
  5.         elem(a, b) => (case ope of
  6.             "+" => f(a) + splosna f b ope)
  7.         | empty b => 0
  8.  
  9.  
  10.  
  11. splosna (fn x => List.length x) d "+"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement