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
module Factorisation where | |
import Control.MonadZero (guard) | |
import Data.Array (concatMap, cons, nub, sort, (..)) | |
import Data.Functor (map) | |
import Data.Tuple (Tuple(..)) | |
import Prelude (bind, pure, ($), (==), discard, (*)) | |
factors :: Int -> Array (Tuple Int Int) | |
factors n = do |
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 uk.gov.hmrc.bforms.validatetest | |
import cats.kernel.Monoid | |
import cats.data.Validated | |
import cats.instances.all._ | |
import cats.syntax.cartesian._ | |
import java.time.LocalDate | |
import org.scalatest._ | |
import scala.util.Try |
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 uk.gov.hmrc.bforms.models | |
import org.scalatest.{ FlatSpec, Matchers } | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import org.scalatest.concurrent.ScalaFutures | |
import cats.data.EitherT | |
import cats.instances.future._ | |
class EitherTSpec extends FlatSpec with Matchers with ScalaFutures { |
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 funkypandagame | |
import org.scalatest.FlatSpec | |
import org.scalatest.Matchers | |
import play.api.libs.json._ | |
import shapeless.tag | |
import shapeless.tag.@@ | |
sealed trait IdTag | |
sealed trait NameTag |
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 taggettest | |
import org.scalatest.FlatSpec | |
import org.scalatest.Matchers | |
import play.api.libs.json._ | |
import scalaz.{Tag, @@} | |
sealed trait UserTag |