There was a coder dojo format this Saturday.
The monthly NYC #fsharp lab (in DUMBO) ... Playing with type providers (thanks to @nyfacurrent and @JetTechnology) pic.twitter.com/tZijdj9IcN
— Paulmichael Blasucci (@pblasucci) April 18, 2015
Today with the F# group, we worked on katas during coder dojo. Exercises from https://github.com/c4fsharp/Dojo-Type-Provider-Treasure-Hunt
Learned some F# quirks…
In Xamarin the way to run code (highlighted) is CTRL+Ret
- F# lists uses
;to separate elements instead of, - In order to logically compare two values, you use one
=instead of two== - When grabbing the substring from,
"string".[..1]don’t forget the dot . right before the left square bracket. Use 2 dots instead of ‘:’. When starting from first index, you can skip typing the 0. - The easiest way to convert an integer to string is to use
string(i) -
Seq, short for sequence, is the most generic type of array. You can grab the.heador.lastelement
“In F#, exceptions should be truly exceptional. In .NET you only want to throw exceptions at highest level or if something happened in internals (i.e. database connection shot)” ~ Paul B.