Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

OCAML

Name: Anonymous 2012-08-07 11:03


# let rec reverse lis acc =
    match lis with
      [] -> acc
    | x::xs -> reverse xs x::acc;;
Error: This expression has type 'a list
       but an expression was expected of type 'a
# let rec reverse(lis,acc) =
    match lis with
      [] -> acc
    | x::xs -> reverse(xs,x::acc);;
val reverse : 'a list * 'a list -> 'a list = <fun>


FFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

Name: Anonymous 2012-08-07 11:58

# let rec reverse lis acc =
    match lis with
      [] -> acc
    | x::xs -> reverse xs
(x::acc);;
val reverse : 'a list -> 'a list -> 'a list = <fun>


I don't even know OCaml.

Name: Anonymous 2012-08-07 12:11

The bowls are not what they seem

Name: Anonymous 2012-08-07 21:27

>>2

Thank you.

Don't change these.
Name: Email:
Entire Thread Thread List