elm/exercises/pascals-triangle
2017-10-07 14:40:53 -04:00
..
tests add pascals-triangle exercise 2017-10-07 14:38:24 -04:00
elm-package.json add pascals-triangle exercise 2017-10-07 14:38:24 -04:00
package.json add pascals-triangle exercise 2017-10-07 14:38:24 -04:00
README.md add pascals-triangle exercise 2017-10-07 14:38:24 -04:00
Triangle.elm add pascals-triangle exercise 2017-10-07 14:38:24 -04:00
Triangle.example.elm add pascals-triangle exercise 2017-10-07 14:38:24 -04:00

Pascals Triangle

Compute Pascal's triangle up to a given number of rows.

In Pascal's Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row.

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1
# ... etc

Elm Installation

Refer to the Exercism help page for Elm installation and learning resources.

Writing the Code

The first time you start an exercise, you'll need to ensure you have the appropriate dependencies installed.

$ npm install

Execute the tests with:

$ npm test

Automatically run tests again when you save changes:

$ npm run watch

As you work your way through the test suite, be sure to remove the skip <| calls from each test until you get them all passing!

Source

Pascal's Triangle at Wolfram Math World http://mathworld.wolfram.com/PascalsTriangle.html

Submitting Incomplete Solutions

It's possible to submit an incomplete solution so you can see how others have completed the exercise.