第4回 Scala 関西ビギナーズ (session|LT)
の提案.
Scala はその人気の高まりとともに世界的には普及期に入りつつある. 日本においても,東京都心の D 社や D 社などを中心に Scala プログラマーが増えつつある. しかし,関西を含むほとんどの地域では Scala プログラマーお人口密度が低く,
import scala.annotation.tailrec | |
object BinarySearch { | |
def lowerBound(xs: Array[Int], x: Int): Int = { | |
@tailrec | |
def loop(first: Int, count: Int): Int = | |
if (count == 0) first | |
else { | |
val step = count / 2 | |
if (xs(first + step) < x) loop(first + step + 1, count - step - 1) |
(ns tnoda.pe10) | |
(defn- sieve | |
"Returns an array of primes below len. Retrieved from | |
https://github.com/tnoda/tnoda.math.prime." | |
[^long len] | |
(let [n len | |
not-prime (doto (boolean-array n) | |
(aset 0 true) | |
(aset 1 true)) |
package main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"io" | |
"os" | |
"strconv" | |
) |
;;; mon-css-color.el --- Highlight and edit CSS colors | |
;; -*- mode: EMACS-LISP; -*- | |
;;; ================================================================ | |
;; Copyright © 2009, 2010 MON KEY. All rights reserved. | |
;; Copyright © 2008, 2009 Lennart Borgman | |
;; Copyright © 2008 Niels Giesen | |
;;; ================================================================ | |
;; AUTHOR: Niels Giesen |
$ make recipes/helm-ad | |
• Building recipe helm-ad ... | |
emacs --no-site-file --batch -l package-build.el --eval "(let ((package-build-stable nil) (package-build-archive-dir (expand-file-name \"./packages\" pb/this-dir))) (package-build-archive 'helm-ad))" | |
Error reading recipe /Users/tnoda/work/melpa/recipes/helm-ad~: Recipe 'helm-ad~' contains mismatched package name 'helm-robe' | |
;;; helm-ad | |
Fetcher: github | |
Source: tnoda/helm-ad |
次の 1--3 のどれかで LT したいです.
(let [v ["ジョ" "ン" "ボ" "ヴィ"] | |
a (reverse ["ジョン" "ボン" "ジョヴィ"]) | |
s (->> (repeatedly #(str (rand-nth v) (rand-nth v))) | |
(reductions #(cons %2 %) []) | |
(drop-while #(not= a (take 3 %))) | |
first)] | |
(println (->> (reverse s) | |
(interpose "・") | |
(apply str)) | |
"\n" |