Created
September 19, 2016 10:23
-
-
Save sou-lab/d68db069c9a49d1ba63353c8c6ad213f to your computer and use it in GitHub Desktop.
reverse a list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//配列をリバース | |
@function reverse($list) { | |
$result: (); | |
@for $i from length($list)*-1 through -1 { | |
$result: append($result, nth($list, abs($i)), comma); | |
} | |
@return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment