Sha256: e77301af9e87c633d6766a80862ed2ef039809820f297c3298e3abc2742b96d1
Contents?: true
Size: 424 Bytes
Versions: 31
Compression:
Stored size: 424 Bytes
Contents
module Bob open System let response (input: string) = let isEmpty = String.IsNullOrWhiteSpace input let isYell = Seq.exists Char.IsLetter input && input = input.ToUpperInvariant() let isQuestion = input.Trim().EndsWith "?" match input with | _ when isEmpty -> "Fine. Be that way!" | _ when isYell -> "Whoa, chill out!" | _ when isQuestion -> "Sure." | _ -> "Whatever."
Version data entries
31 entries across 31 versions & 1 rubygems