From c37034d5eee9e328bd99bf6a3499091e8d7d025b Mon Sep 17 00:00:00 2001 From: Rob Keim Date: Mon, 12 Dec 2016 11:27:32 +0100 Subject: [PATCH] Add HINTS.md for hello-world/difference-of-squares/rna-transcription to address issue #234 --- exercises/difference-of-squares/HINTS.md | 3 +++ exercises/grains/HINTS.md | 3 ++- exercises/hello-world/HINTS.md | 5 +++++ exercises/rna-transcription/HINTS.md | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 exercises/difference-of-squares/HINTS.md create mode 100644 exercises/hello-world/HINTS.md create mode 100644 exercises/rna-transcription/HINTS.md diff --git a/exercises/difference-of-squares/HINTS.md b/exercises/difference-of-squares/HINTS.md new file mode 100644 index 000000000..d938e2cde --- /dev/null +++ b/exercises/difference-of-squares/HINTS.md @@ -0,0 +1,3 @@ +## Hints +For this exercise the following F# feature comes in handy: +- [Seq.sumBy](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/seq.sumby%5B't,%5Eu%5D-function-%5Bfsharp%5D) is a condensed format to apply a function to a sequence and then sum the results \ No newline at end of file diff --git a/exercises/grains/HINTS.md b/exercises/grains/HINTS.md index 1e5f5d7d5..fbc8ebf01 100644 --- a/exercises/grains/HINTS.md +++ b/exercises/grains/HINTS.md @@ -1,3 +1,4 @@ ## Hints For this exercise the following F# feature comes in handy: -- [BigInt](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/numerics.biginteger-structure-%5Bfsharp%5D) \ No newline at end of file +- [BigInt](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/numerics.biginteger-structure-%5Bfsharp%5D) +- [Seq.sumBy](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/seq.sumby%5B't,%5Eu%5D-function-%5Bfsharp%5D) is a condensed format to apply a function to a sequence and then sum the results \ No newline at end of file diff --git a/exercises/hello-world/HINTS.md b/exercises/hello-world/HINTS.md new file mode 100644 index 000000000..55a8fbb8d --- /dev/null +++ b/exercises/hello-world/HINTS.md @@ -0,0 +1,5 @@ +## Hints +For this exercise the following F# feature comes in handy: +- [Match Expressions](https://fsharpforfunandprofit.com/posts/match-expression/) Also known as pattern matching which is like a switch statement on steriods. It's a very powerful ability in the F# language and will come in handy in many of the exercises. While this example can be trivially solved with an if/else, pattern matching is more idiomatic. +- [sprintf](https://fsharpforfunandprofit.com/posts/printf/) While F# supports string concatenation using sprintf leads to easier to read solutions and is also idiomatic +- [defaultArg](https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/operators.defaultarg%5B't%5D-function-%5Bfsharp%5D) Default arg is useful when extracting a value from an option type and providing a value when None is encountered. \ No newline at end of file diff --git a/exercises/rna-transcription/HINTS.md b/exercises/rna-transcription/HINTS.md new file mode 100644 index 000000000..8e41f826d --- /dev/null +++ b/exercises/rna-transcription/HINTS.md @@ -0,0 +1,3 @@ +## Hints +For this exercise the following F# feature comes in handy: +- [Match Expressions](https://fsharpforfunandprofit.com/posts/match-expression/) While this can be solved using a dictionary, using a match expression is more idiomatic. \ No newline at end of file