Forum Stats

  • 3,722,791 Users
  • 2,244,415 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Assignment 3 using flatMap()

Steven Nicodemus
Steven Nicodemus Member Posts: 4
edited December 2016 in Java Lambda MOOC

I decided to try assignment 3 using only functional programming rather than using a loop as suggested. I started with a stream with a range of ints as per the instructions. I then created a flatMap from that, starting with another similar range of ints and ending with a stream of arrays, each of which contained a pair of numbers. I haven't thoroughly tested it, but as far as I know, it works. Does this sound reasonable?

Sign In or Register to comment.