Skip to content

Instantly share code, notes, and snippets.

module SAP where
import Data.Function
import Data.List
import Data.List.Split
import System.IO
data Token = Token {colour :: Colour, value :: Int}
deriving (Eq)
@Jiggins
Jiggins / Temp.java
Last active August 29, 2015 14:07
Output of a valiant effort
import java.util.Scanner;
public class Temp{
public static void main (String [] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
if (n == 1) {System.out.println("2");}
if (n == 2) {System.out.println("4");}
if (n == 3) {System.out.println("8");}
--Create functions to do the following:
{- Solutions to the questions I gave last week.
Note: This is the way I would answer these questions. In Haskell, there
are usually many ways to get the same solution, so dont worry if
any of your answers are different. If you have a solution that is
different, please lete me know.
If you have any questions, please ask me. Use the Moodle Forum, the
facebook group or the email address I posted on the Facebook page. I am