This file contains hidden or 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
| ;;; Copyright (c) 2013 Yoshinori Kohyama. Distributed under the BSD 3-Clause License. | |
| (ns puyo | |
| (:require [clojure.test :refer (with-test run-tests are)] | |
| [clojure.set :refer (union)] | |
| [clojure.string :as string])) | |
| (with-test | |
| (defn- fall-one [b s] | |
| (->> (reverse b) | |
| (apply map vector) |
This file contains hidden or 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 scala.concurrent._ | |
| import ExecutionContext.Implicits.global | |
| import android.util.Log | |
| import android.widget.TextView | |
| class UIDemoActivity extends Activity { | |
| override def onCreate(bundle: Bundle) { | |
| super.onCreate(bundle) | |
| val tv = new TextView(this) |
This file contains hidden or 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 com.github.nscala_time.time.Imports._ | |
| import annotation.tailrec | |
| import org.joda.time.DateTimeConstants | |
| object Calculator extends App{ | |
| val start = nextMonday(DateTime.now.toLocalDate) | |
| val days = start :: Stream.iterate(start + 1.day)(_ + 1.day).takeWhile(_.getDayOfWeek != DateTimeConstants.MONDAY).toList | |
| val result = days.map { |
This file contains hidden or 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
| % ex. 1 | |
| local B in | |
| thread | |
| B=true % 1 | |
| end | |
| thread | |
| B=false % 2 | |
| end | |
| if B then % 3 | |
| {Browse yes} % 4 |
OlderNewer