Skip to content

Instantly share code, notes, and snippets.

@paulp
Created October 10, 2011 12:18
Show Gist options
  • Save paulp/1275161 to your computer and use it in GitHub Desktop.
Save paulp/1275161 to your computer and use it in GitHub Desktop.
---
- &CENTER { x: 1, y: 2 }
- &LEFT { x: 0, y: 2 }
- &BIG { r: 10 }
- &SMALL { r: 1 }
# All the following maps are equal:
- # Explicit keys
x: 1
y: 2
r: 10
label: center/big
- # Merge one map
<< : *CENTER
r: 10
label: center/big
- # Merge multiple maps
<< : [ *CENTER, *BIG ]
label: center/big
- # Override
<< : [ *BIG, *LEFT, *SMALL ]
x: 1
label: center/big
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment