build.sbt って、かならず settingの値 じゃないといけないから、
val UnfilteredVersion = "0.5.0"
っていう行を定義できないけれど、こんな風 ↓ に書けば DRY に書けるね!っていう、超細かいどーでもいいテクニック !
Some("net.databinder","0.5.0").map{case (a,v) =>
# Description: | |
# 進捗 is the most important thing in your life | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
scala> Iterator.iterate(0)(_ + 1).take(10).addString(new StringBuilder, ",") | |
res7: StringBuilder = 0,1,2,3,4,5,6,7,8,9 | |
scala> Stream.iterate(0)(_ + 1).take(10).addString(new StringBuilder, ",") | |
res8: StringBuilder = 0,? | |
scala> Iterator.iterate(0)(_ + 1).take(10).toString | |
res9: String = non-empty iterator | |
scala> Stream.iterate(0)(_ + 1).take(10).toString |
package main | |
import ( | |
"math/rand" | |
"fmt" | |
"strings" | |
) | |
var words = []string { | |
"ボ", |
$ dig @202.216.229.30 a cloudfront.net. | |
; <<>> DiG 9.9.2-P2 <<>> @202.216.229.30 a cloudfront.net. | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32100 | |
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 | |
;; OPT PSEUDOSECTION: |
@if (0) == (0) echo off | |
cscript //nologo /E:JScript "%~f0" %* | |
exit /b %ERRORLEVEL% | |
@end | |
var args = WScript.Arguments | |
if( args.length < 2 ){ | |
WScript.Echo("Usage: cscript ln.js [-s] FILENAME TARGET"); | |
WScript.Quit(1); | |
} |
var global = this; | |
global.__defineGetter__("self", function _() { | |
return _.caller || global; | |
}); | |
function foo() { | |
alert(self); | |
} |
import play.db.anorm._ | |
import play.db.anorm.defaults._ | |
trait Identifiable[A] { | |
type ID = A | |
val id: Pk[ID] | |
} | |
trait ExMagic[A <: Identifiable[_]] extends Magic[A] { | |
opt <- options(warn=-1) | |
## ------------------------------------------------------------ | |
## Test | |
## ------------------------------------------------------------ | |
## > rm(list=ls()); source("Eval.R") | |
## > repl() | |
## rlisp > (<- make.counter (function (c) (function () (<<- c (+ c 1))))) |
build.sbt って、かならず settingの値 じゃないといけないから、
val UnfilteredVersion = "0.5.0"
っていう行を定義できないけれど、こんな風 ↓ に書けば DRY に書けるね!っていう、超細かいどーでもいいテクニック !
Some("net.databinder","0.5.0").map{case (a,v) =>
//To compile this, "-P:continuations:enable" option is needed. | |
import scala.util.continuations._ | |
import scala.collection._ | |
object Generator { | |
abstract sealed class Computation[+A] | |
case class Yielded[A](k: Unit => Computation[A], v: A) extends Computation[A] | |
case object Done extends Computation[Nothing] | |
type yieldable[A] = cps[Computation[A]] |