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
module Ch07a2 where | |
import Prelude (Unit, discard, show, (==), (<=), (<), (>), (>=), ($)) | |
import Data.Eq (class Eq) | |
import Data.Ord (class Ord) | |
import Data.Show (class Show) | |
import Data.Generic.Rep (class Generic) | |
import Data.Show.Generic (genericShow) | |
import Effect (Effect) | |
import Effect.Console (log) |
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
module Ch07a1 where | |
import Prelude (Unit, discard, (<>)) | |
import Effect (Effect) | |
import Effect.Console (log) | |
-------------------- JS Primitives -------------------------------------------------------- | |
foreign import ordIntImpl :: Ordering -> Ordering -> Ordering -> Int -> Int -> Ordering | |
foreign import eqIntImpl :: Int -> Int -> Boolean |
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
module Ch05 where | |
import Prelude (Unit, type(~>), discard, negate, show, otherwise, (+), (-), (<), (>), (<=), (>=), (==), (/=), (<<<)) | |
import Data.List (List(..)) | |
import Data.Maybe (Maybe(..)) | |
import Data.Tuple (Tuple(..), snd) | |
import Effect (Effect) | |
import Effect.Console (log) | |
flip :: ∀ a b c. (a -> b -> c) -> b -> a -> c |
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
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct thing | |
{ | |
char* item; | |
struct thing* next; | |
} thing; |
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
// Built with IMPACT - impactjs.org | |
(function (window) { | |
"use strict"; | |
Number.prototype.map = function (istart, istop, ostart, ostop) { | |
return ostart + (ostop - ostart) * ((this - istart) / (istop - istart)); | |
}; | |
Number.prototype.limit = function (min, max) { | |
return Math.min(max, Math.max(min, this)); | |
}; | |
Number.prototype.round = function (precision) { |
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
% crossword | |
word(astante,a,s,t,a,n,t,e). | |
word(astoria,a,s,t,o,r,i,a). | |
word(baratto,b,a,r,a,t,t,o). | |
word(cobalto,c,o,b,a,l,t,o). | |
word(pistola,p,i,s,t,o,l,a). | |
word(statale,s,t,a,t,a,l,e). | |
h1(H1,V1,V2,V3):- |
NewerOlder