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
#lang racket | |
(provide (except-out (all-defined-out) | |
stack)) | |
(struct exn:fail:stack exn:fail ()) | |
(struct stack ([vector] | |
[top #:mutable]) | |
#:transparent) |
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
#lang racket | |
(define the-key 'the-key) | |
(define the-spell-book 'the-spell-book) | |
(define person% | |
(class object% | |
(init-field items h) | |
(super-new) | |
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
{-# LANGUAGE DeriveFunctor, TypeFamilies #-} | |
module Main where | |
data Pair a = Pair a a | |
deriving (Eq) | |
getFst :: Pair a -> a | |
getFst (Pair x1 _) = x1 |
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
{-# LANGUAGE DeriveFunctor, TypeFamilies #-} | |
module Main where | |
data Pair a = Pair a a | |
deriving (Eq) | |
getFst :: Pair a -> a | |
getFst (Pair x1 _) = x1 |
NewerOlder