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
init { | |
int x = 123; | |
int y = 456; | |
int max; | |
if | |
:: x >= y -> max = x | |
:: y >= x -> max = y | |
fi | |
} |
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
w[0] := a | |
w[1] := -a^2 | |
w[2] := a^3 | |
w[3] := -a^4 + 1/3 | |
w[k_] := w[k] = -Sum[ w[i-1] * w[k-i] / k, {i, k} ] // Simplify |
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
In file included from /usr/include/c++/7.2.1/cstdlib:75:0, | |
from /usr/include/c++/7.2.1/bits/stl_algo.h:59, | |
from /usr/include/c++/7.2.1/algorithm:62, | |
from ../win32xx/include/wxx_appcore0.h:110, | |
from ../win32xx/include/wxx_appcore.h:57, | |
from ../win32xx/include/wxx_wincore.h:96, | |
from frame.cpp:1: | |
/usr/include/stdlib.h:310:5: error: ‘int32_t’ does not name a type; did you mean ‘wint_t’? | |
int32_t *fptr; /* Front pointer. */ | |
^~~~~~~ |
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
import Test.QuickCheck | |
data Tree = L | N Tree Tree deriving (Eq, Show) | |
data Herp | |
= H0 | |
| H1 Tree | |
| H2 Tree Tree | |
| H3 Tree Tree Tree | |
| H4 Tree Tree Tree Tree |
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
# dmidecode 3.0 | |
Getting SMBIOS data from sysfs. | |
SMBIOS 3.0 present. | |
87 structures occupying 4071 bytes. | |
Table at 0x8B256000. | |
Handle 0x0000, DMI type 0, 24 bytes | |
BIOS Information | |
Vendor: American Megatrends Inc. | |
Version: 3.40 |
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
import Control.Monad | |
newtype Mu a = Mu { unMu :: Mu a -> a } | |
bottom :: a | |
bottom = id <*> Mu $ join unMu |
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
using IntOrd | |
(* `Heap` elaborates to `Heap(IntOrd)`, | |
* so `val xs : Heap(IntOrd).t` *) | |
val xs = Heap.fromList [1,2,3]; | |
(* shadows previous `using` declaration *) | |
using Backwards(IntOrd) | |
(* `Heap` elaborates to `Heap(Backwards(IntOrd))`, |
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
infixr 5 ::: | |
datatype 'a stream = Nil | ::: of 'a * 'a stream lazy | |
signature QUEUE = | |
sig | |
type 'a queue | |
val empty : 'a queue | |
val snoc : 'a queue * 'a -> 'a queue |
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
create table male | |
( male_id int not null | |
, name varchar(100) not null | |
, primary key (male_id) ); | |
create table female | |
( female_id int not null | |
, name varchar(100) not null | |
, primary key (female_id) ); |
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
merge xxs@(x:xs) yys@(y:ys) = | |
case compare x y of | |
LT -> x : merge xs yys | |
EQ -> x : merge xs ys | |
GT -> y : merge xxs ys | |
xs = map (*2) hamming | |
ys = map (*3) hamming | |
zs = map (*5) hamming |