{-# OPTIONS --rewriting --without-K --allow-unsolved-metas #-}
open import new-prelude
open import Lecture6-notes
open import Lecture5-notes
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 TypeApplications #-} | |
import Data.Char | |
import Data.Bifunctor (second) | |
import Data.Function | |
import Data.List | |
main = interact $ solution . lines | |
map3 f (a,b,c) = (f a, f b, f 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
Comic.wayfinderFarDistance = 80000 | |
Comic.wayfinderSpread = 300 | |
Comic.wayfinderEls.forEach((x,i) => (x.innerText = i, x.style.color = 'red')) | |
M = (v, min, max) => Math.min(Math.max(v,min),max) | |
window.origUpdateWayfinder = window.origUpdateWayfinder || Comic.updateWayfinder | |
Comic.updateWayfinder = Function("return function " + origUpdateWayfinder.toString().replace("+10*", "+this.wayfinderSpread*"))() | |
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 TypeFamilies #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
module CheckStrictness where | |
import GHC.Generics |
{-# OPTIONS --rewriting --without-K --allow-unsolved-metas #-}
open import new-prelude
open import Lecture6-notes
open import Lecture5-notes
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 FlexibleContexts #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
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
coinSet = [1, 2, 5, 10, 20, 50, 100, 150, 200, 300] | |
-- When no coins are available, there is one way to get 0, no ways to get any other number | |
coins0 = 1:repeat 0 | |
-- Given the result for previous coins, produce a list of possibilities for this coin type | |
coinsN coin preCoins = go | |
where | |
-- We can either get the value by using other coins or from an earlier value in this list |
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
{- | |
Algebraic data is called such because the ways to define a type | |
correspond to the basic algebra operations for numbers: | |
An empty type Void corresponds to 0 | |
The unit type () corresponds to 1 | |
A sum type Either x y corresponds to x + y | |
A product type (x, y) corresponds to x * y |
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
/nix/store/j6w8a63v99z8hhyay1di6k8f7chxmzqq-source | |
├── neuron.cabal | |
├── src | |
│ ├── app | |
│ │ ├── Data | |
│ │ │ └── Structured | |
│ │ │ └── Breadcrumb.hs | |
│ │ ├── Main.hs | |
│ │ └── Neuron | |
│ │ ├── CLI |
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
Gruppvy | |
Has overviewLink? | |
yes? -> HasLink | |
no? -> NoLink | |
HasLink | |
HLOverview | |
# - [ ] Text "Genom att trycka på knappen godkänner jag att min Svalna-data delas med forskare" över knappen om man inte redan godkänt (getProfile {field_profile_accept_research} är true) | |
Description | |
# - [ ] Sätt field_profile_accept_research till true i register_clicked_group_overview_link |
NewerOlder