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
lst = [206.51] | |
++ replicate 5 135.93 | |
++ replicate 15 160.4 | |
++ replicate 2 190.25 | |
++ [1586.42] | |
debt = sum lst | |
-- m | |
m = [-3000] |
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
-- See this document for more information on making Pong: | |
-- http://elm-lang.org/blog/Pong.elm | |
-- Compile this code on http://elm-lang.org/try | |
import Color exposing (..) | |
import Graphics.Collage exposing (..) | |
import Graphics.Element exposing (..) | |
import Keyboard | |
import Mouse | |
import Text |
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
-- author [Roman Cheplyaka](http://www.reddit.com/r/haskell/comments/2y2f1p/pager_in_ghci_like_less/cp5w8a9) | |
import System.Process | |
import System.Posix.IO | |
import System.Posix.Types | |
import Data.IORef | |
import Data.List (intersperse) | |
import System.IO.Unsafe | |
{-# NOINLINE pid_ref #-} | |
pid_ref :: IORef (ProcessHandle, Fd) |
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 Data.Ratio | |
mS=19891*10^26 % 1 --in kg Sun mass | |
mE=597219*10^19 % 1 --in kg Earth mass | |
rE=6371000 % 1 --in m Earth radius | |
tE=3652564 % 10000 --in days Earth siderial year | |
mM=73477*10^18 % 1 --in kg Moon mass | |
rM=1737500 % 1 --in m Moon radius | |
aU=149597870691 % 1 --in m distance to Sun | |
gN=6673 % (10^14) --in m3/(kg*s2) gravitational constant G |
NewerOlder