Sha256: 8a92138d3b8e131ef5e38958e5d60b41ff4b2012a58e6406478aa212a7f2f560

Contents?: true

Size: 413 Bytes

Versions: 262

Compression:

Stored size: 413 Bytes

Contents

module Bob

open System

let hey(input: string) = 
    let isEmpty = String.IsNullOrWhiteSpace input
    let isYell = Seq.exists Char.IsLetter input && input = input.ToUpperInvariant()
    let isQuestion = input.EndsWith "?"

    match input with 
        | _ when isEmpty -> "Fine. Be that way!"
        | _ when isYell -> "Whoa, chill out!"
        | _ when isQuestion -> "Sure."
        | _ -> "Whatever."

Version data entries

262 entries across 262 versions & 1 rubygems

Version Path
trackler-2.2.1.24 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.23 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.22 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.21 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.20 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.19 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.18 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.17 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.16 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.15 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.14 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.13 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.12 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.11 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.10 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.9 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.8 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.7 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.6 tracks/fsharp/exercises/bob/Example.fs
trackler-2.2.1.5 tracks/fsharp/exercises/bob/Example.fs