I hereby claim:
- I am electrocutie on github.
- I am electrocutie (https://keybase.io/electrocutie) on keybase.
- I have a public key ASDKaTj1zKxT1O4hYIKcLIMtpD_dl4AYTbwsNPyE6MgmNgo
To claim this, I am signing this object:
sieve :: [Int] | |
sieve = 2 : ([3,5..] >>= test sieve) | |
where | |
test p c = test' p c $ floor . sqrt . fromIntegral $ c | |
test' (p:ps) c lim --primes and candiate | |
| p > lim = [c] | |
| rem c p == 0 = [] | |
| otherwise = test' ps c lim |
I hereby claim:
To claim this, I am signing this object:
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Data.ListConsumer ( | |
ListConsumer, takeN, peekN, dropN, takeAll, takeAny, runL, runFoldableL | |
) where | |
import Control.Applicative | |
import Control.Arrow | |
import Control.Monad |
#include <stdint.h> | |
#include <stdio.h> | |
#include <printf.h> | |
#define _stride(_type) ({ \ | |
_type* _t = (_type*) 0; \ | |
(uint64_t) (_t+1); \ | |
}) | |
struct st { |
{-# LANGUAGE ExplicitForAll #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
module Main where | |
import Text.Printf | |
import Calibration.CalUnits |
package cloud.literallya.util; | |
import java.util.Map; | |
import java.util.function.IntSupplier; | |
import java.util.function.LongSupplier; | |
import java.util.function.Supplier; | |
import java.util.logging.Logger; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; |
module Main where | |
import Control.Monad.Random.Lazy | |
import Data.List (find) | |
import Data.Maybe | |
import Debug.Trace | |
import Text.Printf | |
primes :: [Integer] |
module plfa.part1.Induction where | |
import Relation.Binary.PropositionalEquality as Eq | |
open Eq using (_≡_; refl; cong; sym) | |
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎) | |
open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_) | |
-- left identity: C op n ≡ n |
package cloud.literallya.util; | |
import static com.google.common.base.Preconditions.checkArgument; | |
import static java.util.Objects.requireNonNull; | |
import java.util.Objects; | |
import java.util.Optional; | |
import java.util.function.Consumer; | |
import java.util.function.Function; | |
import java.util.function.Supplier; |
//include "/sprintf.js"; | |
//snippet "Object.freeze"; | |
//snippet "Array.forEach"; | |
(function(){ | |
"use strict"; | |
function getOrCall(o, attr){ |