F# – defining a type extension for generic array
Peculiarly I couldn’t find any documented way to create a type extension for a generic array, ‘a [ ], turns out you need to use backtick marks ( ` ) around the square brackets in order to do that:
Peculiarly I couldn’t find any documented way to create a type extension for a generic array, ‘a [ ], turns out you need to use backtick marks ( ` ) around the square brackets in order to do that:
Note: Don’t forget to check out Benchmarks page to see the latest round up of binary and JSON serializers. Following on from my previous test, I have now included JsonFx and as well as the Json.Net BSON serializer in the mix to see how they match up. The results (in milliseconds) as well as the …
Considering a very simple finite state machine (FSM) such as a code lock which requires you to enter a 4-digit numeric code and upon which will open the lock for a brief few seconds. Such a FSM have two states: Locked and Open. Every time a key is entered it checks the sequence of digits …
Another week, another Thursday, another release and another new slot to add to our platoon of F#-backed slots game, Plants vs Zombies Summer Brains is now live on Lucky Gem Casino! Plants vs Zombies Summer Brainz As you can see from the sports stadium in the background, this brand new 25-line slot is clearly themed …
Related Posts Part 1 Part 2 Part 3 Here I will look at how some commonly used functions in F#’s List module might be translated to Erlang using Erlang’s equivalent – the lists module. List.append F#: let newList = List.append [ 1..5 ] [ 6..10 ] Erlang: NewList = lists:append([ 1, 2, 3, …
What does this F# code look like in Erlang – Part 4 of N Read More »
Today we released another new slot that runs on our F# slots engine onto JackpotJoy Slots. This time it’s a Japanese themed game with a rather cool bonus game feature Samurai vs Ninja Samurai vs Ninja is a 25-line slot, when you land a Samurai symbol on the first and a Ninja symbol on the …
Related Posts Part 1 Part 2 Part 4 Throwing Exceptions In F#, you can define a custom exception type by creating a type that inherit from System.Exception or using the lightweight exception syntax to define them with the same syntax as discriminated unions. You can throw exceptions in F# using the raise keyword or …
What does this F# code look like in Erlang – Part 3 of N Read More »
Related Posts Part 1 Part 3 Part 4 if-else In F#, if-else if-else control flow is expressed in the form if Exp then Exp elif Exp then Exp else Exp: let f n = if n = 42 then printfn "%d is the answer to the ultimate question of life, the universe …
What does this F# code look like in Erlang – Part 2 of N Read More »
To install Erlang on your Mac, follow these simple steps: download the latest source file from the official Erlang site here. open the Terminal go to the folder where you’ve saved the .gz source file run the following command: tar –xzf otp_src_R15B01.tar.gz (replace the filename with the name of the file you’ve downloaded) then go …
Brushing up on Erlang again having spent so much time with F# since I last looked at Erlang, it’s startling how much parallels I see between the two languages in terms of features and syntax, and I’m sure it’s no coincidence To help myself and other F# programmers who’re curious about Erlang get started more …
What does this F# code look like in Erlang – Part 1 of N Read More »
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.