ChangeLog を書く際によく使われる英語をまとめました。
ほとんど引用です。
(def user-info ["robert8990" 2011 :name "Bob" :city "Boston"]) | |
;= #'user/user-info | |
(let [[username account-year & extra-info] user-info, | |
{:keys [name city]} (apply hash-map extra-info)] | |
(format "%s is in %s" name city)) | |
;= "Bob is in Boston" | |
;; This example is equal to below. | |
(let [[username account-year & {:keys [name city]}] user-info] | |
(format "%s is in %s" name city)) |
(let [a (inc (rand-int 6)), | |
b (inc (rand-int 6))] | |
(println (format "You rolled a %s and b %s" a b)) | |
(+ a b))) | |
(defn hypot | |
[x, y] | |
(let [x2 (* x x), | |
y2 (* y y)] |
(ns example.another) | |
(defn hello [] (println "Hello")) | |
(ns twilog-scraper.core | |
(:require [net.cgrand.enlive-html :as html] | |
[skyscraper :as s]) | |
(:gen-class)) | |
(defn seed [username] | |
(let [url (str "http://twilog.org/" username "/archives")] | |
[{:username username | |
:url url | |
:processor :archives-page}])) |
;; package | |
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) | |
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) | |
(package-initialize) | |
(require 'cl) | |
(defvar installing-package-list | |
'( | |
anything |
(ns demo.core | |
(:require [compojure.core :as c :refer [defroutes GET POST]] | |
[hiccup.core :as h] | |
[hiccup.form :as hf] | |
[ring.adapter.jetty :as server] | |
[ring.util.response :as res])) | |
(defn html-response [res] | |
(res/content-type res "text/html;charset=utf-8")) |
(def a (agent 100 | |
:validator #(not= % 1) | |
:error-handler println)) | |
(defmulti collatz even?) | |
(defmethod collatz true | |
[x] | |
(println x) | |
(/ x 2)) |
package ex; | |
import javax.servlet.Servlet; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.nio.charset.StandardCharsets; |
Set<String> keys = map.keySet(); | |
for (String key : keys) { | |
//some condes | |
} | |
//↑が↓になった | |
Set<String> keys = map.keySet(); | |
String[] keyarray = keys.toString().split(","); | |
for(int i=0; i<keyarray.length; i++){ |