[ create a new paste ] login | about

_kobashi

Name: Kobashi Kazuhide
Email:
Site/Blog: http://twitter.com/_kobashi
Location: Japan
Default language:
Favorite languages: Java,Perl,C,haskell
About:

Saved pastes by _kobashi:

Haskell, pasted on Dec 22:
1
2
3
4
data T a = It (String,a) deriving Show

eta:: a -> T a
eta x = It ([],x)
...
view (24 lines, 5 lines of output)
C, pasted on Feb 10:
1
2
3
4
5
main() {
  // float
  printf("%.30f\n", 1/3.0f);
  printf("%lx\n", 1/3.0f);
  printf("%llx\n", 1/3.0f);
...
view (19 lines, 14 lines of output)
C, pasted on Mar 29:
1
2
3
4
5
#include<math.h>
main(){
register int i=3,j,k=2,m=3,s=0,q=0;
const int o = 2*3*5*7*11*13*17;
const int w = 7;
...
view (51 lines, 3 lines of output)
C, pasted on Mar 29:
1
2
3
4
5
#include<math.h>
main(){
register int i=3,j,k=2,l,m=3,s=0,q=0;
const int o = 2*3*5*7*11*13*17*19;
const int w = 8;
...
view (57 lines, 6 lines of output)
C, pasted on Mar 29:
1
2
3
4
5
#include<math.h>
main(){
register int i=3,j,k=2,l,m=3,s=0;
const int o = 2*3*5*7*11*13*17*19;
const int w = 8;
...
view (66 lines, 6 lines of output)
C, pasted on Mar 29:
1
2
3
4
5
#include<math.h>
main(){
register int i=3,j,k=2,l,m=3,s=0;
const int o = 2*3*5*7*11*13*17*19;
const int w = 8;
...
view (60 lines, 7 lines of output)
C, pasted on Mar 29:
1
2
3
4
5
#include<math.h>
main(){
register int i=3,j,k=2,l,m=3,s=0,q=0;
const int o = 2*3*5*7*11*13*17*19;
const int w = 8;
...
view (57 lines, 6 lines of output)
C, pasted on Mar 29:
1
2
3
4
5
#include<math.h>
main(){
int i=3,j=0,k=2,l,p[1000];
p[0]=2;p[1]=3;
for(;k<1000;){
...
view (45 lines, 4 lines of output)
C, pasted on Mar 24:
1
2
3
4
5
#include<math.h>
main(){
register int i=3,j,k=2,l,m=3,s=0,q=0;
const int o = 2*3*5*7*11*13*17*19;
const int w = 8;
...
view (37 lines, 6 lines of output)
C, pasted on Mar 23:
1
2
3
4
5
#include<math.h>
main(){
int i=3,j=0,k=2,l,p[1000];
p[0]=2;p[1]=3;
for(;k<1000;){
...
view (76 lines, 5 lines of output)
C, pasted on Mar 23:
1
2
3
4
5
#include<math.h>
main(){
int i=3,j,k=2,l,m=3,q=0,s=0,p[1000],t[100000];
p[0]=2;p[1]=3;
for(;k<1000;){
...
view (34 lines, 6 lines of output)
C, pasted on Mar 18:
1
2
3
4
5
#include<math.h>
main(){
int i=3,j=0,k=2,l,p[1000];
p[0]=2;p[1]=3;
for(;k<1000;){
...
view (31 lines, 4 lines of output, 1 comment)
Haskell, pasted on Mar 6:
1
2
3
4
www :: [a] -> [a] -> [a]

www _ [] = []
www a (x:xs) = foldl (\v w -> v++a++[w]) [x] xs
...
view (9 lines, 3 lines of output)
Haskell, pasted on Mar 6:
1
2
3
4
www :: [a] -> [a] -> [a]

www _ [] = []
www a (x:xs) = foldl (\v -> ((v++a)++).(:[]) ) [x] xs
...
view (9 lines, 3 lines of output)
Haskell, pasted on Mar 6:
1
2
3
4
5
www :: [a] -> [a] -> [a]

www _ [] = []
www a (x:xs) = [x] ++ (foldr f [] xs)
 where f v = (a++).(v:)
...
view (10 lines, 3 lines of output)
Haskell, pasted on Mar 6:
1
2
3
4
5
www :: [a] -> [a] -> [a]

www _ [] = []
www a (x:xs) = [x] ++ (foldr f [] xs)
 where f v w = a++(v:w)
...
view (10 lines, 3 lines of output)
Haskell, pasted on Mar 6:
1
2
3
4
5
www :: [a] -> [a] -> [a]

www _ [] = []
www a (x:xs) = foldl f [x] xs
 where f v w = v++a++[w]
...
view (10 lines, 3 lines of output)
Haskell, pasted on Mar 6:
1
2
3
4
www :: [a] -> [a] -> [a]

www _ [] = []
www a (x:xs) = foldl (\v -> ((v++a)++).(:[])) [x] xs
...
view (9 lines, 3 lines of output)
Haskell, pasted on Mar 6:
1
2
3
4
www :: [a] -> [a] -> [a]

www a b |  length b > 1 = foldl (\v w -> v++a++[w]) (take 1 b) (drop 1 b)
        |  otherwise    = b
...
view (9 lines, 3 lines of output)
Haskell, pasted on Feb 17:
1
2
3
4
5
b = [(x,y)|x<-[1..8], y<-[1..8] ]
c = [ a | x<-[1..8], a <- [(x,y)|y<-[1..8] ] ]
d = [ a | x<-[1..8], a <-  [(x,y)|y<-[1..8] ]:[] ]
e = [ [(x,y)|y<-[1..8] ] | x<-[1..8]]
f [] = []
...
view (21 lines, 23 lines of output, 31 comments)
Haskell, pasted on Dec 18:
1
2
3
4
5
main = do
 print $ (C 'a')+++(I 123)
 print $ (C2 'a')+++(I2 123)
 print $ C 'a'
 print $ I2 123
...
view (21 lines, 4 lines of output)
Haskell, pasted on Dec 17:
1
2
3
4
5
main = do
 print $ (C 'a')+++(I 123)
 print $ (C2 'a')+++(I2 123)
 print $ C 'a'
 print $ I2 123
...
view (19 lines, 4 lines of output)