Sha256: 540f7079747296ad64b8a1ab8bfa35634ecccda8144a87fbbf3cd93078f66ce1
Contents?: true
Size: 453 Bytes
Versions: 19
Compression:
Stored size: 453 Bytes
Contents
open Core.Std let is_empty = String.for_all ~f:Char.is_whitespace let is_shouting s = String.exists ~f:Char.is_alpha s && String.for_all ~f:(fun c -> not (Char.is_alpha c) || Char.is_uppercase c) s let is_question = String.is_suffix ~suffix:"?" let response_for = function | s when is_empty s -> "Fine. Be that way!" | s when is_shouting s -> "Whoa, chill out!" | s when is_question s -> "Sure." | _ -> "Whatever."
Version data entries
19 entries across 19 versions & 1 rubygems