This file contains 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
module Grammar where | |
import Prelude | |
import Control.Applicative.Free (FreeAp, liftFreeAp, foldFreeAp) | |
import Control.Alt (class Alt, (<|>)) | |
import Control.Alternative (class Alternative) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (log, CONSOLE) | |
import Control.Plus (class Plus, empty) |
This file contains 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
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE, log, logShow) | |
import Data.Newtype (class Newtype, unwrap) | |
import Data.Profunctor (dimap) | |
import Data.Profunctor.Strong (class Strong, second) | |
import Data.Tuple (Tuple(..), uncurry) | |
import Type.Proxy (Proxy(..)) |
This file contains 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
node_modules |
This file contains 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
GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help | |
Prelude> import Control.Concurrent.STM | |
Prelude Control.Concurrent.STM> vars <- atomically $ mapM (\ _ -> newTVar False) [1..10] | |
Prelude Control.Concurrent.STM> length vars | |
10 | |
Prelude Control.Concurrent.STM> :t vars | |
vars :: [TVar Bool] | |
Prelude Control.Concurrent.STM> import Control.Concurrent as CC | |
Prelude Control.Concurrent.STM CC> CC.forkIO ( do x <- atomically (do { xs <- mapM readTVar vars ; if and xs then return True else retry } ) ; if x then putStrLn "wippeee" else putStrLn "wattt") | |
ThreadId 489 |
This file contains 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
-- CIS 194 Homework 2 | |
module Log where | |
import Control.Applicative | |
data MessageType = Info | |
| Warning | |
| Error Int | |
deriving (Show, Eq) |
This file contains 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
#!/usr/bin/ruby | |
def bottom_up(p, n) | |
r = Array.new(n,0) | |
(1..n).each do |j| | |
q = -1 | |
(1..j).each do |i| | |
q = [q, r[j-i] + |
This file contains 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
"perfis":{ | |
"conservador":{ | |
"renda_fixa":{ | |
"percentuais":[70,65,60,55,50,45,40,35,30,25], | |
"divisao":{ | |
"Renda Fixa Referenciado":100, | |
"Renda Fixa Índice":0 | |
} | |
}, | |
"multimercado":{ |