Snippets created by Ankur Dhama
F# impl of SelectMany and TakeUntil from Rx
F# implementation of SelectMany and TakeUntil (from Rx) on F# events
13 people like this
Posted: 1 years ago by Ankur DhamaTree searching using Tail recursion with continuation
Sample code which demonstrate tree searching using : Tail recursion with continuation
9 people like this
Posted: 1 years ago by Ankur DhamaFunction to generate circular infinite sequence from a list
Function to generate circular infinite sequence from a list
12 people like this
Posted: 1 years ago by Ankur DhamaFunction to generate all possible combinations where combination "ab" != "ba"
Function to generate all possible combinations where combination "ab" is different then "ba"
5 people like this
Posted: 1 years ago by Ankur DhamaSimple HTTP server with Async workflow
Simple HTTP server with Async workflow and Http Listener
1 people like this
Posted: 1 years ago by Ankur DhamaMerge two events in one event to move over a list
Merge two events in one event to move over a list. Can be used to implement a wizard / slider mechanism
11 people like this
Posted: 1 years ago by Ankur DhamaParse HTTP chunked response
Code to parse HTTP chunked response, to use as a client to a Comet server who uses chunked encoding to transfer real time notification data
1 people like this
Posted: 1 years ago by Ankur DhamaSimple Object orientation using Record types
Simple Object orientation using Record types. No complex - private public internal virtual abstract object oriented programming :)
5 people like this
Posted: 1 years ago by Ankur DhamaObject oriented as it was supposed to be ?
The snippet shows implementing object orientation using mail box processor. In this context object orientation have this simple definition: "Objects acts on message passing". The objects created this way are thread safe too :). Not sure how much practical this would be in todays context where object oriented has gone the wrong way.
19 people like this
Posted: 1 years ago by Ankur DhamaSolution to the problem mentioned at : http://professor-fish.blogspot.com/2011/01/tiny-bit-of-denotational-semantics.html
Solution to the problem mentioned at : http://professor-fish.blogspot.com/2011/01/tiny-bit-of-denotational-semantics.html
1 people like this
Posted: 1 years ago by Ankur Dhama
Lazy String
Lazy string based on seq<char>
4 people like this
Posted: 1 years ago by Ankur DhamaTree using sequences
Tree implementation using sequences.
2 people like this
Posted: 1 years ago by Ankur DhamaSeq.filter with accumulator
Seq.filter with accumulator, without using mutable or ref.
1 people like this
Posted: 1 years ago by Ankur DhamaSelect n elements in group from seq
Select n elements in group from seq
1 people like this
Posted: 12 months ago by Ankur DhamaF# Future using lazy and a threading event
F# Future using lazy and a threading event. Supports creating futures from functions or asyncs. Eager evaluation of can be specified.
3 people like this
Posted: 10 months ago by Ankur DhamaSeq group continuous matching elements
Seq group continuous matching elements [1;1;1;2;2;2] will become [ [1;1;1] ; [2;2;2] ]
2 people like this
Posted: 10 months ago by Ankur DhamaSplit sequences
Split sequences based on a predicate.
1 people like this
Posted: 10 months ago by Ankur DhamaTake value from a sequence only when it changes
Take value from a sequence only when it changes (based on a predicate). Ex: Seq [1;1;1;3;3;3;5;5;5] will result in [3;5]
0 people like this
Posted: 9 months ago by Ankur DhamaSimple job processor
Generic batch job processor using Mail box processor. Sending quit message using PostAndReply will ensure that all jobs are completed before returning. (Exception handling is responsibility of the job)
4 people like this
Posted: 9 months ago by Ankur DhamaRx CombineLatest for list of IObservable<'a> to IObservable<'a array>.
Rx CombineLatest for list of IObservable<'a> to IObservable<'a array>.
12 people like this
Posted: 9 months ago by Ankur Dhama