Cubes

cubes 100 == [64]
cubes 600 == [64, 512]

Partial Average

partAvg 3 [10,15,50,10000] == 25

Say GPA

sayGPA 3.10 == "My GPA is 3.10"

Count Up I

countUp 3 7 == "I can count from 3 to 7: [3, 4, 5, 6, 7]"

Count Up II

countUpII "3" "7" == "I can count from 3 to 7: [3, 4, 5, 6, 7]"

Need read?

Use type signatures and helper functions.


Sample Standard Deviation

Input a list of numbers, say there are n of them.

  1. Find the average (called “xbar”).
  2. Find the sum of (x-xbar)^2 for each x in the list.
  3. Divide by n-1.
  4. Take the square root.