Author | Message |
---|---|
avarg116
Posts: 8
|
Posted 11:35 Mar 04, 2019 |
Hello All, Here is the link to the Github Repo for the solutions presented today: https://github.com/austinv211/Functional-Libraries Thought I would post for any of those interested in the way I implemented the Haskell solution to problem number 5 in Python. Thanks, Austin Vargason |
rabbott
Posts: 1649
|
Posted 15:37 Mar 04, 2019 |
Thanks, and nice work today. Do you have a Haskell solution to Problem 4? I didn't see it in https://github.com/austinv211/Functional-Libraries. Last edited by rabbott at
15:37 Mar 04, 2019.
|
kverma
Posts: 6
|
Posted 17:00 Mar 04, 2019 |
Thanks Austin !! |
avarg116
Posts: 8
|
Posted 18:50 Mar 04, 2019 |
Hi, I updated the Github link to include the solution to problem 4 in Haskell. https://github.com/austinv211/Functional-Libraries Thanks, Austin Vargason |
rabbott
Posts: 1649
|
Posted 20:09 Mar 04, 2019 |
Unless I'm reading it wrong, it looks to me like there are a couple of problems. Here's the code.
a). b)
91 => 9 1 => (18) 1 => 9 1 => 10
Last edited by rabbott at
20:15 Mar 04, 2019.
|
jungsoolim
Posts: 38
|
Posted 21:16 Mar 04, 2019 |
Jay came up with this version. I think this is pretty good and I would like to share it with you. toDigit :: Char -> Int uncurry' :: (t2 -> t1 -> t) -> (t2, t1) -> t fn :: Int -> Int myLuhn' :: Int -> Bool testCC :: [Bool]
{- In cycle [id, fn] , 'id' is a id function which does not do anything. It will just return the original value. -} {- Or make it Point - free as this myLuhn :: Int -> Bool
-} Last edited by jungsoolim at
21:34 Mar 04, 2019.
|
rabbott
Posts: 1649
|
Posted 21:33 Mar 04, 2019 |
Looks good! Thanks for posting it. |
avarg116
Posts: 8
|
Posted 12:08 Mar 05, 2019 |
Thanks Soo and Jay! Didn't spend much time on problem4 due to working on the other problems. I updated the code to fix the issues in the way I implemented it. |