Skip to content

Inject FSharpFunc automatically #2

Closed
@Brains

Description

@Brains

Based on #1 (comment)

I really tried to add support for FSharp.Core.FSharpFunc but this extension is much more complicated than I expected.

Instead, added few small helpers which worked great.

module CFunc =
    open System
    let one (func:Func<_,_>)       =        func.Invoke
    let two (func:Func<_,_,_>)     = curry  func.Invoke
    let tri (func:Func<_,_,_,_>)   = curry3 func.Invoke
    let fou (func:Func<_,_,_,_,_>) = curry4 func.Invoke

These are completely enough in my case.
Thank you again for performed migration to Unity.5 #1

Opened this ticket just to document my case, for future reference if somebody needs or else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions