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
| #!/usr/bin/env python | |
| import re | |
| import sys | |
| from collections import deque | |
| class Frame: | |
| def __init__(self,node,indent): | |
| self.node = node | |
| self.indent = indent |
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
| object mapfunc { | |
| println("Let's do wacky things with lists") //> Let's do wacky things with lists | |
| import scala.concurrent._ | |
| import ExecutionContext.Implicits.global | |
| // Hold a list of functions of no arguments producing A | |
| class SeqF[A] (l : Seq[()=>A]) { | |
| def map[B](f : A =>B) = new SeqF(l.map( x => () => f(x()))) | |
| def scanLeft[B](b0 : B)(f : (B,A)=>B) : SeqF[B] = { |
NewerOlder