This file contains 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
package com.emilypi.scalaupnorth.fold | |
/** | |
* Created by emilypi on 5/18/17. | |
*/ | |
case class Mu[F[_]](unFix: F[Mu[F]]) |
This file contains 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.annotation.tailrec | |
/** | |
* Created by emilypi on 5/17/17. | |
*/ | |
trait Stream[+A] { | |
import Stream._ | |
def head: () => A |
This file contains 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
package misc | |
import scala.language.higherKinds | |
import scala.util.{Try, Success} | |
import scala.annotation.tailrec | |
object Kinds extends App { | |
trait Functor[F[_]] { |
This file contains 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
trait Instantiator[+A] { | |
def apply(): A | |
} | |
object Instantiator { | |
def apply[A](create: => A): Instantiator[A] = new Instantiator[A] { | |
def apply(): A = create | |
} | |
} |
This file contains 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
package functionaljava.Data; | |
import functionaljava.Data.List; | |
import java.util.function.*; | |
abstract interface Either<A, B> { | |
abstract <T> T foldEither(final Function<? super A, ? extends T> f, Function<? super B,? extends T> g); | |
abstract List<Either<A, B>> lefts(List<Either<A, B>> xs); |
This file contains 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
package interviewDS; | |
/** | |
* @author EmilyPillmore | |
* | |
* Naive base indexed implementation of the SkipList data structure | |
* Average Worst case | |
* Space O(n) O(n log n) | |
* Search O(log n) O(n) | |
* Insert O(log n) O(n) |
NewerOlder