Skip to main content
golfed a byte
Source Link
Wheat Wizard
  • 102.8k
  • 23
  • 299
  • 697

Haskell, 4444 43 bytes

f x=sum.($x).x=[sum$y($divdiv(length x)2)<$>[takex|y<-[take,drop]drop]] 

Try it online!Try it online!

Based on Steven Fontanella's answer with some non-trivial modification.

Haskell, 44 bytes

f x=sum.($x).($div(length x)2)<$>[take,drop] 

Try it online!

Based on Steven Fontanella's answer with some non-trivial modification.

Haskell, 44 43 bytes

f x=[sum$y(div(length x)2)x|y<-[take,drop]] 

Try it online!

Based on Steven Fontanella's answer with some non-trivial modification.

Source Link
Wheat Wizard
  • 102.8k
  • 23
  • 299
  • 697

Haskell, 44 bytes

f x=sum.($x).($div(length x)2)<$>[take,drop] 

Try it online!

Based on Steven Fontanella's answer with some non-trivial modification.