File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -373,6 +373,24 @@ function set_tail(xs,x) {
373
373
}
374
374
}
375
375
376
+ // take(xs, n) puts the first n elements of xs into a list.
377
+ function take ( xs , n ) {
378
+ if ( n < 0 ) {
379
+ throw new Error ( "take(xs, n) expects a positive integer as " +
380
+ "argument n, but encountered " + n ) ;
381
+ }
382
+ return ( n === 0 ) ? [ ] : pair ( head ( xs ) , take ( tail ( xs ) , n - 1 ) ) ;
383
+ }
384
+
385
+ // drop(xs, n) removes the first n elements from xs and returns the rest (as a list)
386
+ function drop ( xs , n ) {
387
+ if ( n < 0 ) {
388
+ throw new Error ( "drop(xs, n) expects a positive integer as " +
389
+ "argument n, but encountered " + n ) ;
390
+ }
391
+ return ( n === 0 ) ? xs : drop ( tail ( xs ) , n - 1 ) ;
392
+ }
393
+
376
394
//function display(str) {
377
395
// var to_show = str;
378
396
// if (is_array(str) && str.length > 2) {
Original file line number Diff line number Diff line change 226
226
text-align : left ;
227
227
}
228
228
229
- md th ,
230
- td {
229
+ . md th ,
230
+ .md td {
231
231
text-align : left ;
232
232
padding : 8px ;
233
233
}
234
234
235
- md tr :nth-child (even ) {
235
+ . md tr :nth-child (even ) {
236
236
background-color : #f2f2f2 ;
237
237
}
You can’t perform that action at this time.
0 commit comments