lwhjp,
@lwhjp@mstdn.jp avatar

In ,
(foldl1' nums) <$> [min, max]
gives [a, b] being the minimum and maximum of nums. Is there a concise way to get a tuple instead without writing fold twice? Seems like something to do with bifunctors or arrows, but I haven't managed to wrap my head around it yet. (I realize this is somewhat pointless golfing)

jaror,
@jaror@kbin.social avatar

@lwhjp (($ min) &&& ($ max)) (foldl1' nums)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines