Open andymac-2 opened 6 years ago
Would the fizz-buzz program be a good candidate for this?
Absolutely! Although, if you decide to use a language other than Haskell, consider trying to use recursion, or maps/folds/reduces as much as possible.
Thanks for the prompt reply! It will be in Haskell 😄
Fizz Buzz PR is raised. Let me know if you can think of any other simple (or not so simple) examples or programs and I'll definitely have a go at them.
No problems, I was thinking about emulating some of the basic unix utilities. I would love to see more code from you!
sort
: implement quicksort or mergesortuniq
: group a file by it's unique linesyes
: print an infinite list of y
'sgrep
: find a word or pattern in a file and print the line(s) where it occurred.Added sort
and yes
They were fairly easy. yes
was a bit too easy 😛
Currently working on grep
in my free time.
Is it okay if I search for just string
or text
? As in, read the file and then separate it into lines using the lines
function (I'm assuming the file has newline characters in it) and then search for the input string
in each line and finally report where the input word was found.
Welcome to anyone new who comes across here!
I was hoping to teach my dad how to learn Haskell, who lives far away, by writing a series of tutorials. However, I lack a bit of creativity sometimes. I was hoping if anybody has some good example programs or functions that would be suitable to write about in a tutorial (they don't have to be written in Haskell)
If you're learning to program and have an example program that you learned something new from, or it was something you enjoyed writing, make a PR here! Any and all input is welcomed. I invite anyone who comes across here to contribute and get that extra PR for Hacktoberfest!
Please provide any or all of the following:
If you don't know Haskell that's fine. Just implement it in a programming language of your choice
and Preferably
Please put your program in the
src
directory (nothing there yet)