Standard ML of New Jersey (32-bit) v110.99 [built: Thu Dec 24 11:01:10 2020] - - - fun f1 ( (x,y)::ps ) = (x+y) :: f1 ps; stdIn:9.5-9.38 Warning: match nonexhaustive (x,y) :: ps => ... val f1 = fn : (int * int) list -> int list - - - f1 [ (1,2), (3,4), (5,6), (7,8) ]; uncaught exception Match [nonexhaustive match failure] raised at: stdIn:9.38 - - - fun f1 [] = [] = | f1 ( (x,y)::ps ) = (x+y) :: f1 ps; val f1 = fn : (int * int) list -> int list - - - f1 [ (1,2), (3,4), (5,6), (7,8) ]; val it = [3,7,11,15] : int list - - - - fun f2 [] = 0 = | f2 ( (x,y)::ps ) = (x+y) + (f2 ps); val f2 = fn : (int * int) list -> int - - - f2 [ (1,2), (3,4), (5,6), (7,8) ]; val it = 36 : int - -