YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-1.k
Normal file
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-1.k
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
s: "1234567890"
|
||||
"1234567890"
|
||||
s _di 0 /Delete 1st character
|
||||
"234567890"
|
||||
s _di -1+#s /Delete last character
|
||||
"123456789"
|
||||
(s _di -1+#s) _di 0 /String with both 1st and last character removed
|
||||
"23456789"
|
||||
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-2.k
Normal file
8
Task/Substring-Top-and-tail/K/substring-top-and-tail-2.k
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
s: "1234567890"
|
||||
"1234567890"
|
||||
1 _ s /Delete 1st character
|
||||
"234567890"
|
||||
-1 _ s /Delete last character
|
||||
"123456789"
|
||||
1 - -1 _ s /Delete 1st and last character
|
||||
"23456789"
|
||||
Loading…
Add table
Add a link
Reference in a new issue