I hereby claim:
- I am chochos on github.
- I am chochos (https://keybase.io/chochos) on keybase.
- I have a public key whose fingerprint is 064F FB7F 04CB 9FD1 EF11 7004 44AE 821F 3C43 F763
To claim this, I am signing this object:
abstract class Padre() { | |
shared formal String nombre; | |
print("Creando Padre"); | |
} | |
class A extends Padre { | |
shared actual String nombre; | |
print("Creando un A"); | |
shared new A() extends Padre() { | |
nombre="Default"; | |
} |
value t1=[1, "2", 3.0]; | |
value [a,b,c]=t1; | |
print(a==1); | |
print(b=="2"); | |
print(c==3.0); | |
value d->e = "K"->1; | |
print(d=="K"); | |
print(e==1); | |
value [f,g,[h,i,j]]=[9,10,t1]; | |
print(f==9); |
I hereby claim:
To claim this, I am signing this object:
byte[] encode(int x) { | |
byte[] b = new byte[2]; | |
b[0] = (byte)(x>>8 & 0xff); | |
b[1] = (byte)(x & 0xff); | |
return b; | |
} | |
int decode(byte[] b) { | |
return ((b[0] & 0xff) << 8) | (b[1] & 0xff); | |
} |
function meta(f) { | |
console.log("en meta"); | |
f(); | |
} | |
var lista=[meta,meta,meta]; | |
var fun=function() { | |
console.log("funcion"); | |
} | |
for(var i=0;i<lista.length;i++) { | |
var item=lista[i]; |
import ceylon.time { | |
today, date | |
} | |
import ceylon.time.base { | |
monthOf, Month, sunday, saturday | |
} | |
shared void run() { | |
value hoy = today(); | |
value quarters = [ for (m in (1..12).partition(3)) m.collect(monthOf) ]; |
task watchConcurrently { | |
new Thread({ | |
tasks.watch.execute() | |
} as Runnable).start() | |
} | |
run.dependsOn watchConcurrently |
shared class Permutator<out Element>({Element*} source) satisfies Iterable<{Element*}> { | |
shared actual Iterator<{Element*}> iterator() { | |
value elems = source.sequence(); | |
if (elems.size>1) { | |
value arr = Array(source); | |
value idxs = Array(0..arr.size); | |
void swap(Integer i, Integer j) { | |
if (exists ei=arr[i], exists ej=arr[j]) { | |
arr.set(i,ej); |
class Toy(shared String name, shared Integer time) { | |
string="``name`` (takes ``time``m)"; | |
} | |
Comparison sortFast(Toy a, Toy b) | |
=> a.time<=>b.time; | |
Toy[2] fastestPair([Toy*] gang) { | |
assert(nonempty g=gang.sort(sortFast), | |
nonempty r=g.rest); |
import java.lang.reflect.*; | |
public class Skip { | |
public final String s; | |
public Skip(String s) { | |
this.s=s; | |
} | |
public static void main(String... args) throws Exception { | |
Skip me = new Skip("Initial"); |