Skip to content

ryannedolan/flim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flim

FP in Go

Flim turns strings like "x+y" into lambdas:

foo := fl.Lambda(`x + y`)
foo(1, 2)
-> 3

You can apply lambdas to chans:

ch := fl.Range(1, 100).Chan()
fl.Iter(ch).Filter(`x < 50`).Map(`x*x`).Fold(0, `x + y`).List()
-> List(40425)

You can also apply normal Go functions:

items := []int{1, 2, 3, 4}
fl.Iter(items).Map(func (i int) int { return i + 1 }).Array()
-> {2, 3, 4, 5}

Releases

No releases published

Packages

No packages published

Languages