- April 14th, 2017: given
eitherOr, neitherNor :: Eq a => a -> a -> a -> Bool
Is eitherOr not neitherNor?
Prove or disprove. - April 14th, 2017: given
neitherNor :: Eq a => a -> a -> a -> Bool
andNot :: Eq a => a -> a -> Bool
How do you compose neitherNor 1 0 and andNot 4? - April 11th, 2017:
opts :: Credentials -> Options
opts c = defaults & auth ?~ basicAuth (pack $ keyToken c) (pack $ secretToken c)
point-free-itize
given:
data Credentials = Credentials { keyToken, secretToken :: String }
and (?~) and (&) are from Control.Lens
Snaps for elegance
The above code from quillio/Twillo.hs by ismailmustafa
Incorporates strong typing over predicate logic programming, and, conversely, incorporates predicate logic programming into strongly typed functional languages. The style of predicate logic is from Prolog; the strongly typed functional language is Haskell.
Wednesday, May 10, 2017
April 2017 1HaskellADay 1Liners
Monday, May 1, 2017
April 2017 1HaskellADay Problems and Solutions
- April 26th, 2017: Today we do SCIENCE! (ballistic physics, actually) with #haskell.
- April 25th, 2017: "MOM! MOM! NO BOOK!" Today's #haskell problem: help little Johnny or little Jane's mom find the book! Today's #haskell solution solves mom + mom + no == book, where k == 9 in the blink of an eye with SCIENCE!
- April 21st, 2017: Today's #haskell problem analyzes @wikidata when it has very poor data-quality and -quantity. #Alaska
- April 19th, 2017: Today's #haskell problem looks at autom(agic)ally generating a SPARQL eye-color query. Today's solution gives EyeColors reified to #haskell values from a @wikidata SPARQL query
- April 18th, 2017: Today's #haskell problem takes on the HUGE task of automating writing simple SPARQL queries. Today's #haskell solution presents a simple, well-typed @wikidata SPARQL query builder.
- April 17th, 2017: We look at US States and their Capitals as SPARQLwikidata.org query for today's #haskell problem. For today's #haskell solution we had to drill down into depth of #wikidata resulting JSON to get our State Capitals.
- April 14th, 2017: Today's #haskell problem we make our first foray (again) into the world of @wikidata. What color are your eyes? We get our results back as JSON from our wikidata.org SPARQL query for today's #haskell solution.
- April 13th, 2017: For today's #haskell problem we have a little multiplication puzzle. Today's #haskell solution is 'Prolog-escque.' What would your approach be? Oh, and function-composition with (<*>)
- April 12th, 2017: Today's #haskell problem is a little word puzzle via the Mensa Genius Quiz-a-Day Book by Dr. Abbie Salny. Today's #haskell solution finds you looking rather smart, I must say!
- April 7th, 2017: You're decorating for Spring so you need to write a constraint solver because you're in #Mensa for today's #haskell. tfw you write all these generate and test functions and replace them with a simple filter application #haskell
- April 6th, 2017: Today's #haskell problem is (kinda) based on the OS upon which all other OS's bow down before: FORTH. Fight me. And today #haskell solution we find a use for the </> operator.
- April 5th, 2017: Today's #haskell problem looks at the rise of #bitcoin prices over the past year. Today's #haskell solution runs investment scenarios over a year of historical #bitcoin price data
Subscribe to:
Posts (Atom)