F# Casts (@FSharpCasts) header
F# Casts (@FSharpCasts) profile picture

Quickly demonstrating the F# language and tools.

Northern Virginia
Joined February 2017
Spent this afternoon making basic F# classes and record types transpile to C# classes and record types.
1
2
396
Happy New Year!
4
430
Github Copilot works surprising very well with F#
7
2
39
BTW, Thank you for pointing this out. I'm not a fan of mixing exceptions with Result types, let alone replacing exceptions with Result types. They're two different animals and both deserve thoughtful consideration.
3
Part 2 - Using Cantor's unpairing function to map integers to our calculator language. (A recursive type) It's getting closer to being a total function. But what if we used unbounded bigints?
3
5
Generate: Int → Lang ???? Can we define a small recursive language and then map the set of integers to example instances of our language?
1
2
5
When two total functions (these should be uint, not int) map to each other in a special way, they can create a bijection. For this demo, we uniquely map the set of integers to a pair of integers and back.
3
10
Turning partial functions into total functions
2
12
32
F# is a pretty good at working with generics. If you see 'a or 'b or 'c (etc) in your function signature, it means you're defining a generic function. Maybe you did it on purpose, or maybe didn't give the F# compiler enough to infer the types you wanted.
7
1
23
I'm making my Swifty fan page with a tiny home-grown DSL. Read more here: gist.github.com/sgoguen/9120…
2
6
1
21
Cyclomatic complexity can make software hard to grok+maintain. Enforced layering helps prevent accidental cycles. share.linqpad.net/8tcadj.lin…
1
25
22
Web libraries like Redux and Flux fold input into state and notify views with events when they've been updated: share.linqpad.net/apnlt2.lin…
1
5
8
Nothing more exhilarating than juggling 1000 chainsaws of mutable state! What could possibly go wrong? share.linqpad.net/iuvnc9.lin…
2
3
You should be able to write any program if you're allowed *one* mutable variable and an infinite sequence of inputs: share.linqpad.net/q87jwf.lin…
1
3
7
Some ideas are timeless and take on a minimal form. What minimal and timeless idea might you express as an #fsharp operator? #myfsoperator
2
17
23