$class_names = wrap ( $data ) -> tryProp ( 'page_config' ) -> bind ( function ( Lst $x ) { return $x -> filter ( function ( $y ) { return $y [ '_type' ] === 'header' ; }) -> tryHead (); }) -> bind ( function ( $x ) { return $x -> tryProp ( 'header_attrs' ); }) -> bind ( function ( $x ) { return $x -> filter ( function ( $y ) { return $y [ '_type' ] === 'class' ; }) -> tryHead (); }) -> bind ( function ( $x ) { return $x -> tryProp ( 'class' ); }) -> getOrElse ( '' ); This is the repeating patter
Liked this? Start your own feed.
Comment
Sign in to join the discussion.
Loading comments…