Skip to content

Instantly share code, notes, and snippets.

@iambowen
Last active December 21, 2015 22:38
Show Gist options
  • Save iambowen/6376252 to your computer and use it in GitHub Desktop.
Save iambowen/6376252 to your computer and use it in GitHub Desktop.
scala implementation
Range(1,11).filter(_%2 == 0).map(_/2).map(println)
@XuefengWu
Copy link

Stream.from(1).filter(_ % 2 == 0).map(_ / 2).take(5).foreach(println)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment