or string at error.pl line 20. my $entry = Entry->new({ title => "hello, yapc", }); print("title: " . $entry->title); print("content:\n" . $entry->content); ΤϥʔͰͳ͍͕༧ظ͠ͳ͍ৼΔ͍
n: Int => fib(n) }: Int => Int) .filter({ n :Int => n < 100}: Int => Boolean) ! def fib(n: Int): Int = n match { case 1 | 0 => 1 case m: Int => fib(m - 2) + fib(m - 1) } • ↑͋͑ͯͰ͖Δ͚ͩܕऍΛՃͯ͠Έͨ
def index = Action { val message = "Hello, Play framework!!!" val langs = Seq("Perl", "Scala", "Go") Ok(views.html.index(message, langs)) } } GET / controllers.Application.index GET /list controllers.Application.list POST /create controllers.Application.create SPVUFT "QQMJDBUJPOTDBMB
Tables.entries ) yield entry query.sortBy(_.id.desc).take(10).list SELECT * FROM entries ORDER BY id DESC LIMIT 10 • Scala ͷ for จͷৼΔ͍flatMap/ map/filterϝιουͳͲͷ࣮ʹґଘ
Tables.entries if entry.id === id ) yield (entry.title, entry.content) query.update(title, content) UPDATE entries SET title = ?, content = ? WHERE id = ?;