Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
-- PRIMITIVES | |
button : List (Attribute msg) -> Element msg | |
slider : List (Attribute msg) -> Element msg | |
switch : List (Attribute msg) -> Element msg | |
label : List (Attribute msg) -> Element msg | |
image : List (Attribute msg) -> Element msg | |
-- UIView |
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
{- PATCHES -} | |
type alias Patches = | |
List PatchTree | |
type PatchTree | |
= Change Patch | |
| At Int (List PatchTree) | |
type Patch |
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
public class Main { | |
public static void main(String[] args) { | |
PennPerson p = new Professor(); | |
p.sleep(6); | |
Undergraduate u = new Undergraduate(); | |
// p.teach("CIS 120"); | |
} | |
} | |
public interface PennPerson { |
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 ScopedTypeVariables, TypeApplications, AllowAmbiguousTypes #-} | |
-- {-# OPTIONS_GHC -fdefer-type-errors #-} | |
module Queue where | |
import Data.Maybe (fromJust) | |
import Test.QuickCheck | |
class Queue q where | |
empty :: q 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
group :: Eq a => [a] -> [(a, Int)] | |
group = foldr step [] | |
where step c [] = [(c, 1)] | |
step c whole@((x, n) : xs) | |
| c == x = (x, n + 1) : xs | |
| otherwise = (c, 1) : whole | |
compress :: String -> String | |
compress = | |
concatMap f . group |
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
var nextTimerId = 0 | |
var timerRegistry = [Int: Timer]() | |
let setInterval: @convention(block) (JSValue, Double) -> Int = { (function, interval) in | |
let timer = Timer.scheduledTimer(timeInterval: interval / 1000.0, repeats: true, action: { (timer) in | |
function.call(withArguments: []) | |
}) | |
let timerId = nextTimerId | |
timerRegistry[timerId] = timer |
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
// EXTRA STUFF TO MAKE IT RUN | |
var __2_TAGGER = 'tagger'; | |
var __2_THUNK = 'thunk'; | |
var __2_LEAF = 'leaf'; | |
var __2_PARENT = 'parent'; | |
function F2(fun) { | |
function wrapper(a) { | |
return function(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
<!doctype html> | |
<html> | |
<head> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css"> | |
<link href="https://fonts.googleapis.com/css?family=Lobster|Roboto|Rubik:500" rel="stylesheet"> | |
<link href="site.css" rel="stylesheet"> | |
</head> | |
<body> |