Skip to content

Instantly share code, notes, and snippets.

View johantiden's full-sized avatar

Johan Tidén johantiden

  • Looklet AB
  • Stockholm, Sweden
View GitHub Profile
@JadenGeller
JadenGeller / Factors.hs
Created May 14, 2016 11:56
Factorization in Haskell
import Data.Numbers.Primes
import Data.List
factors :: Integral n => n -> [n]
factors n = case find (\p -> n `mod` p == 0) candidates of
Just p -> p : (factors $ n `div` p)
Nothing -> [n]
where candidates = takeWhile (<= ceiling (sqrt (fromIntegral n))) primes
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 22, 2024 11:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites