From 3e934c2d4ff9e1a5645a94721f490f5fba239e1d Mon Sep 17 00:00:00 2001 From: Simon Shine Date: Mon, 17 Dec 2018 12:31:13 +0100 Subject: [PATCH] Leap: Add link to guards to hints (#792) * Leap: Add link to guards to hints While many students submit something with guards, some don't. This provides learning material up-front. * Remove the "don't use standard library leap functions" message. This change references exercism/problem-specifications#1418. --- exercises/leap/.meta/hints.md | 12 +++++------- exercises/leap/README.md | 15 +++++---------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/exercises/leap/.meta/hints.md b/exercises/leap/.meta/hints.md index 08bc8392d..6902b4a78 100644 --- a/exercises/leap/.meta/hints.md +++ b/exercises/leap/.meta/hints.md @@ -1,11 +1,9 @@ ## Hints -To complete this exercise you need to implement the function `isLeapYear`, -that takes a year and determines whether it is a leap year. +To complete this exercise you need to implement the function `isLeapYear` +that takes a year and determines whether it is a leap year. To solve this +exercise you may read up on: -You can use the provided signature if you are unsure about the types, but -don't let it restrict your creativity: +- [Guards][guards] -```haskell -isLeapYear :: Integer -> Bool -``` +[guards]: https://www.futurelearn.com/courses/functional-programming-haskell/0/steps/27226 diff --git a/exercises/leap/README.md b/exercises/leap/README.md index 5101cfcdc..ac8bb32e2 100644 --- a/exercises/leap/README.md +++ b/exercises/leap/README.md @@ -13,9 +13,6 @@ on every year that is evenly divisible by 4 For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap year, but 2000 is. -If your language provides a method in the standard library that does -this look-up, pretend it doesn't exist and implement it yourself. - ## Notes Though our exercise adopts some very simple rules, there is more to @@ -28,15 +25,13 @@ phenomenon, go watch [this youtube video][video]. ## Hints -To complete this exercise you need to implement the function `isLeapYear`, -that takes a year and determines whether it is a leap year. +To complete this exercise you need to implement the function `isLeapYear` +that takes a year and determines whether it is a leap year. To solve this +exercise you may read up on: -You can use the provided signature if you are unsure about the types, but -don't let it restrict your creativity: +- [Guards][guards] -```haskell -isLeapYear :: Integer -> Bool -``` +[guards]: https://www.futurelearn.com/courses/functional-programming-haskell/0/steps/27226