<script>
	function foo() {}
</script>

{#each things as thing (thing)}
	<div animate:foo></div>
	<div animate:foo></div>
{/each}