Hacker News new | past | comments | ask | show | jobs | submit login
Adventures in F# Performance – Benchmarking the F# Core Library (jackmott.github.io)
7 points by cloudroutine on Aug 16, 2016 | hide | past | web | favorite | 1 comment



The use of the wildcard as a type parameter seems odd here. Why not use (array: 'a[]) for example? I'm guessing its a quirk of the F# syntax?

    let filter f (array: _[]) = 
        checkNonNull "array" array
        let res = List<_>() // ResizeArray
        for i = 0 to array.Length - 1 do 
            let x = array.[i] 
            if f x then res.Add(x)
        res.ToArray()




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: