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 experiments | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.{Await, Future} | |
import scalaz._ | |
import Scalaz._ | |
import scala.concurrent.duration.Duration | |
import natural.TypeSafeMap |
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
use std::cmp::Ordering; | |
use std::io; | |
use std::os; | |
use std::rand; | |
static PICK_RANGE: u32 = 5; | |
enum Command { Pick, Guess } | |
fn parse_command(from: &str) -> Option<Command> { |
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 Control.Monad.Random | |
import Data.List | |
import System.Environment | |
import System.Exit | |
import System.Random | |
import System.IO | |
data Feedback = Smaller | Bigger | Done deriving (Show, Eq) | |
type Guess = Int | |
type Range = (Int, Int) |