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

Quickly demonstrating the F# language and tools.

Northern Virginia
Joined February 2017
Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)
Hello #fsharp Twitter! Did learning F# or some other functional programming seem to “unlock” something for you? If you have a story or comment about how it changed your trajectory or outlook, I’d love to hear from you. Reply in the comments or send me a DM.
8
5
1
18
4,509
Awesome feature @linqpad - just hightlight the code and press CTRL+SHIFT+B to benchmark with BenchmarkDotNet
4
38
2
213
15,439
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
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
Today's F# cast is brought to you by our "wheel watching" friends at @FriedFsharp!
1
3
11
Watching @shanselman video on @bletchleypark made me think - I have an hour on the train, let's port my own #fsharp Enigma emulator to @safe_stack! @FableCompiler is truly fantastic and makes this easy.
2
12
1
39
Replying to @FSharpCasts
@FSharpCasts : #fsharp + #vim : Introduce Parameter (Up) checkout the full readme : github.com/cboudereau/vsvimr…
1
3
As soon as I saw @auchenberg's Browser Preview extension, I know I had to use it for an F# object printer for FSI based on @gmpl's original FsPad project. (github.com/gusty/FsPad/)
9
1
19
Use language native error handling whenever you can
1
2
2
16
Thanks @TomasJansson for the suggestion! So, how do you get rid of the pesky mutable keyword? share.linqpad.net/x6vfdl.lin…
1
1
3