Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Learn more about F# at http://fsharp.org
- open System
- let rec askForFoodSize (isFirst: bool) =
- if(isFirst) then printfn "Please select small, medium or large"
- let input = Console.ReadLine()
- match input with
- | "small" ->
- printfn "okay, tiny bitch"
- | "medium" ->
- printfn "fair enough"
- | "large" ->
- printfn "phat ass bitch"
- | _ ->
- printfn "try again"
- askForFoodSize (false)
- let rec askForFoodChoice () =
- printfn "please choose one of the options"
- let input = Console.ReadLine()
- match input with
- | "salad" ->
- printfn "Healthy choice"
- askForFoodSize (true)
- | "sandwich" ->
- printfn "good enough"
- askForFoodSize (true)
- | "cake" ->
- printfn "naughty bitch"
- askForFoodSize (true)
- | _ ->
- printfn "try again"
- askForFoodChoice ()
- [<EntryPoint>]
- let main argv =
- printfn "We have:"
- printfn "Salad"
- printfn "Sandwich"
- printfn "Cake"
- askForFoodChoice ()
- printfn "Press any key to exit"
- Console.ReadKey() |> ignore
- 0 // return an integer exit code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement