I hereby claim:
- I am kroisse on github.
- I am kroisse (https://keybase.io/kroisse) on keybase.
- I have a public key ASDLkqUXx3YlzVg8RgH6H2gz5QOMAoIqnRczbwD09A0FLgo
To claim this, I am signing this object:
>>> f = open('setup.py') | |
>>> f | |
<_io.TextIOWrapper name='setup.py' mode='r' encoding='UTF-8'> | |
>>> import io | |
>>> isinstance(f, io.TextIOBase) | |
True | |
>>> isinstance(f, io.BufferedIOBase) | |
False | |
>>> isinstance(f, io.RawIOBase) | |
False |
#![feature(test)] | |
extern crate test; | |
// 지극히 평범한 함수. 아래 두 함수와의 형평성을 위해 일부러 레퍼런스를 받도록 정의했습니다. | |
pub fn plain(t: &i64) -> i64 { | |
t.double() | |
} | |
// 트레이트 객체를 인자로 받는 함수. |
I hereby claim:
To claim this, I am signing this object:
fn eternal_pain<'a>( | |
&self, | |
handle: &'a Handle, | |
code: &str, | |
redirect_uri: Option<&str>, | |
) -> impl Future<Item=Output, Error=failure::Error> + 'a { | |
future::result::<_, Error>( | |
self.build_request_uri(code, redirect_uri) | |
).and_then(move |uri| { | |
Client::new(&handle).get(uri).map_err(From::from) |
module Main where | |
import Data.List (genericLength, genericReplicate) | |
import System.Environment (getArgs, getProgName) | |
import System.Exit (exitSuccess) | |
sierpinskiRows :: Integer -> [String] | |
sierpinskiRows 0 = [] | |
sierpinskiRows 1 = ["*"] | |
sierpinskiRows n |
main :: IO () | |
main = do | |
let xs = replicate 4 getLine | |
head xs >>= print |
#![feature(unboxed_closures)] | |
use std::sync::{Arc, Mutex}; | |
use std::mem; | |
use PromiseState::{Ready, Fulfilled, Deferred, Done}; | |
enum PromiseState<T, F: FnOnce(T) + Send> { | |
Ready, |
I hereby claim:
To claim this, I am signing this object:
use std::{iter, slice}; | |
use std::io::{IoResult, Writer}; | |
pub struct BlockWriter { | |
blk_size: uint, | |
blks: Vec<Vec<u8>>, | |
} | |
struct Blocks<'a>(slice::Items<'a, Vec<u8>>); |
use std::io::IoResult; | |
trait Shape { | |
fn draw(&self, size: uint, buf: &mut Writer) -> IoResult<()>; | |
} | |
fn draw<T: Shape>(shape: T, size: uint) { | |
match shape.draw(size, &mut std::io::stdio::stdout()) { | |
Ok(_) => (), | |
Err(e) => fail!(e), |