Odd word problem: Difference between revisions

Line 33:
 
func owp(dst io.Writer, src io.Reader) {
bbyte_in := makefunc ([]) byte, 1){
odd bs := funcmake(s []byte), byte {1)
dstsrc.WriteRead(bbs)
return sbs[0]
}
byte_out := func (b byte) { dst.Write([]byte{b}) }
var odd func(byte) byte
odd = func(s byte) byte {
if unicode.IsPunct(rune(s)) {
return s
}
src.Read(b := odd(byte_in())
b[0] = oddbyte_out(b[0]s)
s,return b[0] = b[0], s
dst.Write(b)
return s
}
for {
for {
src.Read(b := byte_in()
dst.Writebyte_out(b)
if b[0] == '.' {
return
}
if unicode.IsPunct(rune(b[0])) {
break
}
}
src.Read(b := odd(byte_in())
b[0] = oddbyte_out(b[0])
dst.Write(if b) == '.' {
if b[0] == '.' {
return
}
Line 87 ⟶ 90:
 
func owp(dst io.Writer, src io.Reader) {
bbyte_in := makefunc ([]) byte, 1){
odd bs := funcmake()[]byte, {1)
src.Read(bs)
ifreturn bbs[0] == '.' {
}
byte_out := func (b byte) { dst.Write([]byte{b}) }
odd := func() byte {
for {
src.Read(b := byte_in()
if unicode.IsPunct(runeint(b[0])) {
return b
}
defer dst.Writebyte_out([]byte{b[0]})
}
panic("impossible")
}
for {
for {
src.Read(b := byte_in()
dst.Writebyte_out(b)
if b[0] == '.' {
return
}
if unicode.IsPunct(rune(b[0])) {
break
}
}
b := odd()
dst.Writebyte_out(b)
if b[0] == '.' {
return
}
Anonymous user