🤹♀️ 🍲 🐤 🥗
General Stuff 📚 Website: The Official Documentation, by Microsoft📚 Website: F# for Fun and Profit, by Scott Wlaschin🎞️ YouTube Playlist: Learn F#, by Ben Gobeil
/// +--------------------------------------+ | |
/// | | | |
/// | Decider | | |
/// | | | |
/// | Jérémie Chassaing | | |
/// | @thinkb4coding | | |
/// +--------------------------------------+ | |
// A decider is a structure define by 7 parameters: |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
// https://bowlingguidance.com/all-about-strikes-and-spares-in-bowling/ | |
static int Score(IList<int> pins) | |
{ | |
bool startsWithStrike(IList<int> list) => list[0] == 10; |
Thanks to Sergey Tihon for running F# Weekly and F# Advent.
Thanks to manofstick for trying out the code and coming with invaluable feedback. Cistern.ValueLinq is very impressive.
There were many interesting improvements in F#6 but one in particular caught my eye, the attribute InlineIfLambda
.
type Food = | |
| Chicken | |
| Rice | |
type Step<'next> = | |
| GetFood of Food * 'next | |
| Eat of Food * 'next | |
| Sleep of hours:int * 'next | |
module Step = |
Use Onion architecture
Use pipeline model to implement workflows/use-cases/stories
Keep IO at edges
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"log" | |
"net/rpc" | |
) | |
func main() { |