« first day (1531 days earlier)
← previous day
next day →
last day (247 days later) »
Razetime
12:03 PM
@Leo how d o I index into the existing sequence in
fix
?
2 hours later…
Leo
1:52 PM
Hmmmmm, I'll need more details to answer this
3 hours later…
Razetime
4:23 PM
@Leo
codegolf.stackexchange.com/a/223708/80214
this except using
fix
user
You might be able to use plain recursion instead
Oh wait nvm
That'd probably turn out longer
Razetime
plain recursion is longer
user
:(
onixes may come in handy here?
Razetime
might
user
Honestly I don't even know how it works
Razetime
4:37 PM
@user lets say you have a function which returns values from an array
instead of the values it gives indices
user
Not sure how you'd get the n in the fix, perhaps using
Ẋ,
?
@Razetime I don't understand :(
Does it just find the index of an element?
So it wouldn't work with duplicate elements?
Razetime
take any higher order function
say m
m maps each thing to a different thing right
user
Yeah
Razetime
when you add onixes
it tries to get the values and tries to relate them to indices
now on f
it filters things right
user
Yeah
Razetime
4:41 PM
so onixes f
takes the truthy elements
user
@Razetime Wait so what would
ηm
do to a list?
Razetime
and returns the indices
user
Oh
Truthy according to which function, though? edit: nvm
Razetime
@user leave it as is
since there's no relation between indices and the result
@user plain truthy /falsy
when you add onixes you can't add a predicate afaik
user
Ah
I guess onixes won't work, but what about using
Ẋe
to group adjacent pairs, then use
z
to zip with the index aka n and do
n - a(?)
? Then at the end you could use fork to index into the original list
Razetime
5:18 PM
hmm
sounds complicated
might work
user
I'm working on a
Haskell version
but it isn't working :(
Goes into a
loop
Razetime
not very good at haskell
gotta wait for leo
user
Yeah
« first day (1531 days earlier)
← previous day
next day →
last day (247 days later) »
all rooms
Transcript for
Apr
13
Apr '21
17
Apr
18
Husk
A functional golfing language inspired by Haskell. GitHub:
git...
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile