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
-- Haskell program which generates the table | |
import Data.Ratio | |
import Data.List | |
divides :: Integral a => a -> a -> Bool | |
divides y x = x `mod` y == 0 | |
primeFactors :: Integral a => a -> [a] | |
primeFactors n | n < 1 = error "invalid input" |
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
;; manual | |
10000 times { | |
a := 1. | |
a= := { parent a := #'($1). }. | |
do { a = 2. }. | |
}. | |
;; assignable |
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
import java.util.ArrayList; | |
import java.util.Collection; | |
public class CollRaw { | |
public static interface Test { | |
public StringBuilder append(Collection<?> value); | |
} |
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
-- Note: The same warnings about ListT's poor behavior apply to this transformer. | |
-- https://wiki.haskell.org/ListT_done_right | |
import Data.List.NonEmpty | |
import Control.Monad | |
import Control.Monad.List | |
newtype NonEmptyT m a = NonEmptyT { unNonEmptyT :: m (NonEmpty a) } |
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
open import Agda.Builtin.Equality | |
record _∧_ (A B : Set) : Set where | |
constructor conj | |
field | |
proj₁ : A | |
proj₂ : B | |
data List (A : Set) : Set where |
NewerOlder