-
Do it
-
Test it
-
Fix it
-
Done this well
-
Nice work!
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
// | |
// (1) C#: Defining an initializing a dictionary [key type=string, value type=int] | |
// | |
Dictionary<string, int> dict = new Dictionary<string, int>() | |
{ | |
{"Eve", 101}, | |
{"George", 150}, | |
{"Emma", 200} | |
}; | |
// |
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
// | |
// (1) C++: - Defining a dictionary [key type=string, value type=int] | |
// - No easy way to initialize. | |
// | |
map<string, int> dict; | |
// | |
// (1`) C++11: Defining and initializing a dictionary [key type=string, value type=int] | |
// | |
map<string, int> dict | |
{ |
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
import Graphics.Element exposing (Element, flow, down, show) | |
import List exposing (map) | |
main : Element | |
main = | |
let fizzBuzz n = case (n % 3, n % 5) of | |
(0, 0) -> "FizzBuzz" | |
(0, _) -> "Fizz" | |
(_, 0) -> "Buzz" | |
_ -> toString n |
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 Sample where | |
import Stack exposing (..) | |
import String | |
import Html exposing (..) | |
reverseString : String -> String | |
reverseString str = | |
String.split "" str | |
|> Stack.fromList |
NewerOlder