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
import Data.Ratio | |
main :: IO () | |
main = print $ result 5 | |
result :: Integer -> Rational | |
result size = abs $ sum | |
[ fromIntegral mult * infTailSum size d | |
| (mult, d) <- coeffs size | |
] |
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 Main where | |
import Data.Array | |
import Data.List | |
import Data.Ord | |
import Text.Printf | |
type Coord = (Int, Int) | |
type Size = (Int, Int) |
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
;; Packages. | |
(require 'package) | |
(add-to-list 'package-archives | |
(cons "melpa-stable" "http://stable.melpa.org/packages/") t) | |
(package-initialize) | |
(add-to-list 'load-path "~/elisp") ;; for saving some custom code. | |
;; Save customizations in a separate file. | |
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) |
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
;; Packages. | |
(require 'package) | |
(add-to-list 'package-archives | |
(cons "melpa-stable" "http://stable.melpa.org/packages/") t) | |
(package-initialize) | |
(add-to-list 'load-path "~/elisp") ;; for saving some custom code. | |
;; Save customizations in a separate file. | |
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef void (*func) (const char *); | |
struct module { | |
func print; | |
func println; | |
}; |
OlderNewer