Heavy Scala people: Can you rewrite this to produce “combinations” for any nonzero value of “numDice”? https://gist.github.com/dcbriccetti/b70a7ff65541d79c467d …
-
-
@dcbriccetti Specifically, List.fill(numDice)((1 to sides).toList).sequence -
@tixxit Thanks. I would need to decipher that. This program is meant to be educational for a younger audience. match is looking better now
- 4 more replies
New conversation -
-
-
@tixxit@dcbriccetti how to generalize from dice combinations to a generic sequence could make an interesting story :)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.