# Func with fespace argument

**URL:** <https://community.freefem.org/t/func-with-fespace-argument/1394>\
**Category:** General Discussion\
**Created:** [December 16, 2021, 2:21pm UTC](https://community.freefem.org/t/func-with-fespace-argument/1394 "2021-12-16T14:21:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![terribab](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/terribab/32/829_2.png) [@terribab](https://community.freefem.org/u/terribab)\
**Post date:** [December 16, 2021, 2:21pm UTC](https://community.freefem.org/t/func-with-fespace-argument/1394/1 "2021-12-16T14:21:28Z")

</div>

Is it possible to define a function that takes as input a fespace type of variable?  
take as example this synthetic code:

varf a(u,v) = int2d(Th[i]) (dx(u)\*dx(v) + dy(u)\*dy(v));  
func matrix aa(fespace Xh1, fespace Xh2){  
return a(Xh1, Xh2);  
};  
A = aa(Vh1, Vh1); //a(Vh1, Vh1);
