Skip to main content
added 37 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

Japt, 15 15 12 bytes

kS q"|>" rÏiXJÉ 

Try itTry it

  • saved 3 by assuming no whitespaces as suggested by OP @79037662
kS - remove spaces q"|>" - split on pipe r - reduce by ÏiXJÉ - inserting before )  q"|>" - split on pipe r - reduce by ÏiXJÉ - inserting before )

Japt, 15 bytes

kS q"|>" rÏiXJÉ 

Try it

kS - remove spaces q"|>" - split on pipe r - reduce by ÏiXJÉ - inserting before ) 

Japt, 15 12 bytes

q"|>" rÏiXJÉ 

Try it

  • saved 3 by assuming no whitespaces as suggested by OP @79037662
 q"|>" - split on pipe r - reduce by ÏiXJÉ - inserting before )
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

Japt, 15 bytes

kS q"|>" rÏiXJÉ 

Try it

kS - remove spaces q"|>" - split on pipe r - reduce by ÏiXJÉ - inserting before )