import R from 'ramda';

// a -> b -> b
const truncate = R.compose(
  R.join(''),
  R.append('...'),
  R.head,
  R.splitEvery
);

export default truncate;

@@ -15,16 +15,94 @@
 'ramda';
+%0Aimport curry from './util/curry.js';%0Aimport compose from './util/compose.js';
 %0A%0A// a -
@@ -127,18 +127,48 @@
 ncate = 
-R.
+curry(function(a, b) %7B%0A  return 
 compose(
@@ -168,16 +168,18 @@
 ompose(%0A
+  
   R.join
@@ -180,24 +180,26 @@
 R.join(''),%0A
+  
   R.append('
@@ -205,16 +205,18 @@
 '...'),%0A
+  
   R.head
@@ -217,16 +217,18 @@
 R.head,%0A
+  
   R.spli
@@ -233,17 +233,29 @@
 litEvery
-%0A
+(a)%0A  )(b);%0A%7D
 );%0A%0Aexpo

Refactor truncate function to use custom compose/curry function