Skip to content

Instantly share code, notes, and snippets.

@chapmanjacobd
Created December 1, 2019 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chapmanjacobd/eea27ab463a0d843ebbe182a3fb5794a to your computer and use it in GitHub Desktop.
Save chapmanjacobd/eea27ab463a0d843ebbe182a3fb5794a to your computer and use it in GitHub Desktop.
largestDivisible : Maybe Int
largestDivisible divideBy maxInt =
let
p x = x % divideBy == 0
in
List.head (List.filter p List.reverse (List.range 0 maxInt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment