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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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
HOST = $(shell hostname) | |
BANG = $(shell expr match `hostname` ccom-bang) | |
BANG-COMPUTE = $(shell expr match `hostname` compute) | |
LILLIPUT = $(shell expr match `hostname` lilliput) | |
ifneq ($(BANG), 0) | |
PUB = /share/class/public/cse260-fa12 | |
include $(PUB)/Arch/arch.gnu.generic |
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 Main where | |
import qualified Hw1 as H | |
import Text.Printf | |
main :: IO () | |
main = do | |
putStrLn(printf "rectangle sides: %d" (H.sides (H.rectangle 2 3))) | |
putStrLn(printf "rtTriangle sides: %d" (H.sides (H.rtTriangle 2 3))) | |
putStrLn(printf "Polygon sides with 0 vertexes: %d" (H.sides (H.Polygon []))) |
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
--- | |
title: Homework #2, Due Sunday 2/5/13 | |
--- | |
This week's homework is presented as a literate Haskell file, | |
just like the lectures. This means that every line beginning with | |
`>` is interpreted as Haskell code by the compiler, while every other | |
line is ignored. (Think of this as the comments and code being reversed | |
from what they usually are.) | |
You can load this file into `ghci` and compile it with `ghc` |
OlderNewer