akkadotnet/akka.net — pull request #506 by Horusiath (2014-11-22 12:00:37+00:00)
Title: F# API changes

### New F# helper functions

While working with F# and Akka.NET I've often implemented a helper functions, which wrapped actor receiver logic into F#-specific actor loop. My proposition is to to use include them into standard FsApi.

Example:

```fsharp
let receiver = function
| Some x -> printfn "%A" x
| None -> ()

let receiverWithMailbox (mailbox: Actor<'a>) = function
| Some x ->
printfn "%A" x
mailbox.Sender() ()

let system = System.create "sys" (Configuration.defaultConfig())
let r1 = spawn system "receiver" (actorOf receiver)
let r2 = spawn system "receiver2" (actorOf2 receiverWithMailbox)
```

### Breaking changes in existing F# API

1. `Strategy.allForOne'` and `Strategy.oneForOne'` renamed to `Strategy.allForOne2` and `Strategy.oneForOne2` - change inspired by standard F# collections library. Since F# won't allow duplicate function names, all functions with same functionality but different argument lists are recognized by digits at the end of the function names.

2. `select` function - it was broken before, since it couldn't be used out of the actor context. Therefore it now will require two parameters instead of one: ActorRefFactory instance and path. It's basically a wrapper over `ActorRefFactory.ActorSelection` method.

Example:

```fsharp
let system = System.create "sys" (Configuration.defaultConfig())
let selection = select system "akka.tcp://sys@localhost/user/test"
selection