Snippets created by Dmitri Pavlenkov

  • Break sequence into n-element subsequences

    I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.

    38 people like this
    Posted: 1 years ago by Dmitri Pavlenkov

  • Fibonacci sequence

    Cached fib sequence

    10 people like this
    Posted: 1 years ago by Dmitri Pavlenkov

  • inline pow

    LanguagePrimitives help create inline functions

    23 people like this
    Posted: 1 years ago by Dmitri Pavlenkov