This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<colgroup> | |
<col style="width: 50%;"> | |
<col style="width: 20%;"> | |
</colgroup> | |
<tbody> | |
@for (var i = 0; i < Model.IngredientSearchResults.Count; i++) | |
{ | |
var ingredient = Model.IngredientSearchResults[i]; | |
<tr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button type="submit" class="button" name="SpecifyIngredients" value="ClearIngredients">Clear</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
[MultipleFormActionsButton(SubmitButtonActionName = "SpecifyIngredients")] | |
public ActionResult ClearIngredients() | |
{ | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SocialNetworkKata | |
let mutable timelines = Map.empty | |
let mutable followers = Map.empty | |
let post userName message = | |
let userTimeline = if (Map.containsKey userName timelines ) | |
then Map.find userName timelines | |
else [] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fizzBuzz = | |
function | |
| DivisibleBy 3 & DivisibleBy 5 -> "FizzBuzz" | |
| DivisibleBy 3 -> "Fizz" | |
| DivisibleBy 5 -> "Buzz" | |
| n -> n.ToString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (|DivisibleBy|_|) d n = if n % d = 0 then Some DivisibleBy else None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fizzBuzz = | |
function | |
| Fizz & Buzz -> "FizzBuzz" | |
| Fizz -> "Fizz" | |
| Buzz -> "Buzz" | |
| n -> n.ToString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (|Fizz|_|) n = if n % 3 = 0 then Some Fizz else None | |
let (|Buzz|_|) n = if n % 5 = 0 then Some Buzz else None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seq {1..100} | |
|> Seq.map fizzBuzz | |
|> Seq.iter (printfn "%s") |