----
| 422 | } |
| 423 | // ---- |
| 424 | Feature |
| 425 | car(Feature const &feature) |
| 426 | { |
| 427 | switch (feature.index()) { |
| 428 | case IndexFor(CONS): |
| 429 | return std::get<IndexFor(CONS)>(feature)->_car; |
| 430 | case IndexFor(TUPLE): |
| 431 | return std::get<IndexFor(TUPLE)>(feature)[0]; |
| 432 | case IndexFor(GENERIC): { |
| 433 | auto gf = std::get<IndexFor(GENERIC)>(feature); |
| 434 | if (gf) { |
| 435 | return gf->extract(); |
| 436 | } |
| 437 | } |
| 438 | } |
| 439 | return feature; |
| 440 | } |
| 441 | // ---- |
| 442 | Feature & |
| 443 | cdr(Feature &feature) |