This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##programming | |
SrPx | As a side question, if a company has an income, and it wants to compute the most it can of a problem in 10 years, is it better to buy computers as you income comes, or wait 9 years, buy faster computers and to do much more on the last year? Hmm. Not sure why I'm asking this here, that is a math question. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- in reply to http://www.reddit.com/r/haskell/comments/23dxli/why_are_examples_completely_absent_from_hackage/ | |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} | |
import Control.Unification | |
import Control.Unification.IntVar | |
import Control.Monad.Identity | |
import Control.Monad.Trans | |
import Control.Monad.Trans.Error | |
import Data.Foldable | |
import Data.Traversable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveGeneric #-} | |
module Bar where | |
-- import Data.List | |
import qualified Data.Sequence as S | |
import GHC.Generics | |
import Data.Foldable | |
import Data.Monoid | |
import System.IO | |
import qualified Data.ByteString as B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FizzBuzz in Lambda Calculus LiveScript | |
# | |
# Based on the problem from Chapter 6 of | |
# Understanding Computation: From Simple Machines to Impossible Programs | |
# by Tom Stuart | |
# http://computationbook.com/ | |
# | |
# Only these things are allowed: | |
# - Creating functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s x y z = x z (y z) | |
k x y = x | |
i = s k k | |
c = s (s (k (s (k s) k)) s) (k k) | |
b = s (k s) k | |
hello = | |
s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s | |
b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(c k)))))))))))))))))))))))))))))))))))))))))) | |
)))))))))))))))))))))))))))(s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s |