Daily Crap 2007-11-10

  1. My first useful, recursive function in OCaml. I like this language, especially its compiler warnings, though it didn't warn me that my variable names were useless.

    let rec join a b =
      match b with
        [] -> ""
      | head :: [] -> head
      | head :: tail -> head ^ a ^ (join a tail)
      ;;

Comments

Click here to view the comments on this post.