« first day (422 days earlier)      last day (2225 days later) » 

1:11 PM
Hey guys! @Adám if I have a train returning a vector, how can I multiply that whole vector by ⍳≢?
 
1:50 PM
Actually I gave up on that approach and found a new one that requires me to concatenate the result of a train with an earlier result of the same train. Is that even possible without storing to a variable?
 
2:40 PM
@J.Sallé (⊢ × later train result)earlier train result ?
 
@Adám oh nice, that works. I was using the parenthesis at the wrong spot I guess
@Adám so I got this as my final code (⊢,11|(+/⊢×(⍳≢)))3↓¯1↓<arg>. Any way to get rid of some of those parens?
 
3:05 PM
@J.Sallé (⍳≢)⍳∘≢
@J.Sallé If the argument is Boolean, you can replace (+/⊢×(⍳≢)) with 1⊥⍸.
 
3:51 PM
@Adám thanks! Unfortunately it's not a boolean argument, that would've been too good hahahahahah
 
@J.Sallé Yeah, I think we should change the definition of from {(~~,⍵)/,⍳⍴⍵} to {(,⍵)/,⍳⍴⍵}.
 
@Adám I just noticed there's a constraint to the challenge that you need to output a string or a single integer, not a list of digits. How do I turn a vector of digits into a single string or number?
(⊢,11|(+/⊢×⍳∘≢))3↓¯1↓⍎¨'<arg_as_string>' is the current code
ah, I can do 10⊥(⊢,11|(+/⊢×⍳∘≢))3↓¯1↓⍎¨
Is there a better way?
Actually that doesn't work because it removes leading zeroes D:
 
@J.Sallé ∊⍕¨(or ∊0⍕¨ if in a train)?
 
4:06 PM
@Adám ah, I didn't remember that one :p Thanks!
 
 
4 hours later…
ngn
8:00 PM
@J.Sallé you can avoid the parens around (+/⊢×⍳∘≢) if you use A+.×B instead of +/A×B
 

« first day (422 days earlier)      last day (2225 days later) »