Hamming

Other "Hamming" solutions.
open Base

type nucleotide = A | C | G | T

let hamming_distance a b =
  match List.zip a b with
  | [] -> 0
  | [ ([ (x :: xs) ] :: rest) ] -> 1 + hamming_distance rest

Hello World

Other "Hello World" solutions.
let hello = "Hello, World!"

Leap

Other "Leap" solutions.
let leap_year year = 
    year mod 4 = 0 && 
        (year mod 100 <> 0 || year mod 400 = 0)