Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Fable

< >

Fable is a programming language created in 2012.

#1669on PLDB 12Years Old
Homepage

Fable is a compiler that brings F# into the JavaScript ecosystem


Example from the web:
type Face = | Ace | King | Queen | Jack | Number of int type Color = | Spades | Hearts | Diamonds | Clubs type Card = | Face * Color let aceOfHearts = Ace, Hearts let tenOfSpades = (Number 10), Spades match card with | Ace, Hearts -> printfn "Ace Of Hearts!" | _, Hearts -> printfn "A lovely heart" | (Number 10), Spades -> printfn "10 of Spades" | _, (Diamonds|Clubs) -> printfn "Diamonds or clubs" // Warning: // Incomplete pattern matches on this expression. // For example, the value '(_,Spades)' may indicate // a case not covered by the pattern(s).

Language features

Feature Supported Example Token
Print() Debugging printfn
Comments // A comment
Line Comments // A comment //
Semantic Indentation X

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v164.7.0