- Guileを使う
- rlwrapも使う
$ rlwrap -r -c guileこんな感じで使う> ,qで終了する> (load "foo.scm")でソースコード読み込む> ,trace (f 3)で関数の適用をトレースする
1~3章はこちら
| class Color { | |
| Color(this.name); | |
| String name; | |
| String toString() { | |
| return 'Color:${this.name}'; | |
| } | |
| } | |
| class ColorHolder { |
| class Color { | |
| Color(this.name); | |
| String name; | |
| String toString() { | |
| return 'Color:${this.name}'; | |
| } | |
| } | |
| class ColorHolder { |
| import kotlin.Metadata; | |
| import kotlin.ResultKt; | |
| import kotlin.Unit; | |
| import kotlin.coroutines.Continuation; | |
| import kotlin.coroutines.CoroutineContext; | |
| import kotlin.coroutines.intrinsics.IntrinsicsKt; | |
| import kotlin.coroutines.jvm.internal.ContinuationImpl; | |
| import kotlin.jvm.functions.Function2; | |
| import kotlin.jvm.internal.Intrinsics; | |
| import kotlinx.coroutines.BuildersKt; |
| move( state( middle, onbox, middle, hasnot), | |
| grasp, | |
| state( middle, onbox, middle, has) ). | |
| move( state( P, onfloor, P, H), | |
| climb, | |
| state( P, onbox, P, H) ). | |
| move( state( P1, onfloor, P1, H), | |
| push( P1, P2), |
| import kotlinx.coroutines.* | |
| class Watch() { | |
| private var start: Long? = null | |
| fun t(): Long { | |
| return if (start == null) { | |
| start = java.time.Instant.now().toEpochMilli() | |
| 0L | |
| } else { | |
| java.time.Instant.now().toEpochMilli() - (start ?: 0) |
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| ) | |
| // key以上の要素のうちMINである要素の添字を返す | |
| func lowerBound(xs []int, key int) int { | |
| if len(xs) == 0 { |