isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

strip lists and extend webdocs #127

Closed jakobkogler closed 9 years ago

jakobkogler commented 9 years ago

.s (strip) works now also with lists. E.g. .s[0 0 1 0 2 0)0 => [1, 0, 2] Docs and tests included

Added the various string operations ra0-9 and the trigonometric functions to the web-docs. (nobody uses doc.txt anymore)

jakobkogler commented 9 years ago

Also implemented a Pad-operator. E.g. .["hallo"\.8 => hallo..., .[N3\a => "a" or .[Z5U3 => [0, 0, 0, 1, 2].

The order of parameter determines, if the padding happens on the left site, on the right site or on both sites. If this is too confusing, we could also split the operator .].[.???.

Docs and tests included.

refi64 commented 9 years ago

+1 for the pad operator. That has bitten me a few times in code golf.

orlp commented 9 years ago

Hey, I use doc.txt!