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
| import Control.Applicative | |
| import Control.Monad | |
| import Text.Printf | |
| splitBy :: (a -> Bool) -> [a] -> [[a]] | |
| splitBy p [] = [] | |
| splitBy p xs = a : (splitBy p $ dropWhile p $ b) | |
| where | |
| (a, b) = break p xs | |
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
| {-# OPTIONS_GHC -O2 -optc-O3 -optc-ffast-math -cpp #-} | |
| {-# OPTIONS_GHC -funbox-strict-fields -fexcess-precision -monly-3-regs #-} | |
| {-# LANGUAGE BangPatterns, OverloadedStrings, ScopedTypeVariables #-} | |
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| module Main where | |
| import Control.Applicative | |
| import Data.List | |
| import Text.Printf | |
| splitBy :: (a -> Bool) -> [a] -> [[a]] |
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
| {-# OPTIONS_GHC -O2 -optc-O3 -optc-ffast-math -cpp #-} | |
| {-# OPTIONS_GHC -funbox-strict-fields -fexcess-precision -monly-3-regs #-} | |
| {-# LANGUAGE BangPatterns, OverloadedStrings, ScopedTypeVariables #-} | |
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| module Main where | |
| import Control.Applicative | |
| import Data.List | |
| import Text.Printf | |
| splitBy :: (a -> Bool) -> [a] -> [[a]] |
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
| {-# OPTIONS_GHC -O2 -optc-O3 -optc-ffast-math -cpp #-} | |
| {-# OPTIONS_GHC -funbox-strict-fields -fexcess-precision -monly-3-regs #-} | |
| {-# LANGUAGE BangPatterns, OverloadedStrings, ScopedTypeVariables #-} | |
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| module Main where | |
| import Control.Applicative | |
| import Data.List | |
| import Text.Printf | |
| splitBy :: (a -> Bool) -> [a] -> [[a]] |
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
| {-# OPTIONS_GHC -O2 -optc-O3 -optc-ffast-math -cpp #-} | |
| module Main where | |
| import Data.List | |
| import Control.Monad | |
| import Data.Array | |
| import Control.Applicative | |
| import Text.Printf | |
| import Data.Bits | |
| divid :: [Int] -> [([Int], [Int])] |
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
| <!DOCTYPE html> | |
| <html><head><title></title> | |
| <link rel="stylesheet" type="text/css" href="css/frontierCalendar/jquery-frontier-cal-1.3.2.css" /> | |
| <!-- Include CSS for color picker plugin (Not required for calendar plugin. Used for example.) --> | |
| <link rel="stylesheet" type="text/css" href="css/colorpicker/colorpicker.css" /> | |
| <link rel="stylesheet" type="text/css" href="css/jquery-ui/smoothness/jquery-ui-1.8.1.custom.css" /> | |
| <script type="text/javascript" src="js/jquery-core/jquery-1.4.2-ie-fix.min.js"></script> | |
| <script type="text/javascript" src="js/jquery-ui/smoothness/jquery-ui-1.8.1.custom.min.js"></script> | |
| <!-- Include color picker plugin (Not required for calendar plugin. Used for example.) --> | |
| <script type="text/javascript" src="js/colorpicker/colorpicker.js"></script> |
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
| //import scala.collection.mutable.HashMap | |
| //import scala.collection.mutable.Map | |
| import scala.collection.mutable.Stack | |
| import scala.util.parsing.combinator._ | |
| import scala.util.parsing.combinator.syntactical._ | |
| import scala.util.parsing.combinator.lexical._ | |
| //------------------------------------------------------------------- |
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
| //import scala.collection.mutable.HashMap | |
| //import scala.collection.mutable.Map | |
| import scala.collection.mutable.Stack | |
| import scala.util.parsing.combinator._ | |
| import scala.util.parsing.combinator.syntactical._ | |
| import scala.util.parsing.combinator.lexical._ | |
| //------------------------------------------------------------------- |
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
| import scala.collection.mutable.Stack | |
| import scala.util.parsing.combinator._ | |
| import scala.util.parsing.combinator.syntactical._ | |
| import scala.util.parsing.combinator.lexical._ | |
| //---------------------------------------------------------------------------------------------- | |
| abstract class Instraction | |
| case class POP[A] extends Instraction | |
| case class PUSH extends Instraction |
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
| -module (fact). | |
| -export ([fact/1]). | |
| print(X) -> | |
| io:format("~p\n",[X]). | |
| fact(0,Pid) -> | |
| Pid ! 1; | |
| fact(N,Pid) -> | |
| Id = spawn(fun () -> |