>-- | The function 'toSNFA' converts from an NFA to an SNFA>toSNFA::(Eqs,Eqa)=>NFAsa->SNFAsa>toSNFA(NFA{all_states=all>,delta_states=delta>,init_states=init>,final_states=final})=>let-- generate mapping from states to Int>mapping=all`seq`\x->let(Justi)=findIndex(x==)allini>sall_sts=[0..(lengthall)-1]>sdelta_sts=mapping`seq`delta`seq`(map(\(p,x,q)->(mappingp,x,mappingq))delta)>sfinal_sts=mapping`seq`final`seq`(mapmappingfinal)>in{- sall_sts `seq` sdelta_sts `seq` sfinal_sts `seq` -}>SNFA{mapping_states=mapping>,sall_states=sall_sts>,sdelta_states=sdelta_sts>,sinit_states=[0]>,sfinal_states=sfinal_sts}